Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
JM_MATH01
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
JM_MATH01
Commits
29df5faa
Commit
29df5faa
authored
Nov 21, 2021
by
liujiaxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: custom formula input
parent
74394283
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
7 deletions
+18
-7
formula-input.component.ts
src/app/common/formula-input/formula-input.component.ts
+17
-6
index.html
src/index.html
+1
-1
No files found.
src/app/common/formula-input/formula-input.component.ts
View file @
29df5faa
...
@@ -16,6 +16,7 @@ declare global {
...
@@ -16,6 +16,7 @@ declare global {
FormulaBoard
:
any
;
FormulaBoard
:
any
;
__initfp__
:
any
;
__initfp__
:
any
;
__tmp_fp_input_model__
:
any
;
__tmp_fp_input_model__
:
any
;
__FormulaBoard_js_installed__
:
any
;
}
}
}
}
...
@@ -46,6 +47,16 @@ export class FormulaInputComponent implements OnInit, OnChanges, OnDestroy, Afte
...
@@ -46,6 +47,16 @@ export class FormulaInputComponent implements OnInit, OnChanges, OnDestroy, Afte
constructor
()
{
constructor
()
{
if
(
!
window
.
__FormulaBoard_js_installed__
)
{
window
.
__FormulaBoard_js_installed__
=
true
;
const
s
=
document
.
createElement
(
'
script
'
);
s
.
src
=
'
assets/formula-board/formula-board.js
'
;
document
.
head
.
append
(
s
);
s
.
addEventListener
(
'
load
'
,
()
=>
{
this
.
FormulaBoardInit
();
});
}
}
}
ngOnInit
()
{
ngOnInit
()
{
...
@@ -88,12 +99,12 @@ export class FormulaInputComponent implements OnInit, OnChanges, OnDestroy, Afte
...
@@ -88,12 +99,12 @@ export class FormulaInputComponent implements OnInit, OnChanges, OnDestroy, Afte
this
.
ngfModel
=
val
;
this
.
ngfModel
=
val
;
this
.
ngfModelChange
.
emit
(
val
);
this
.
ngfModelChange
.
emit
(
val
);
}
}
ngAfterViewInit
()
{}
ngAfterView
Init
()
{
FormulaBoard
Init
()
{
if
(
window
.
__initfp__
)
{
//
if (window.__initfp__) {
return
;
//
return;
}
//
}
window
.
__initfp__
=
true
;
//
window.__initfp__ = true;
window
.
FBOARD
=
new
window
.
FormulaBoard
({
window
.
FBOARD
=
new
window
.
FormulaBoard
({
// container: this.wrapperEl.nativeElement,
// container: this.wrapperEl.nativeElement,
id
:
this
.
FB_id
,
id
:
this
.
FB_id
,
...
...
src/index.html
View file @
29df5faa
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<link
rel=
"icon"
type=
"image/x-icon"
href=
"favicon.ico"
>
<link
rel=
"icon"
type=
"image/x-icon"
href=
"favicon.ico"
>
<script
type=
"text/javascript"
src=
"https://staging-teach.cdn.ireadabc.com/h5template/h5-static-lib/js/air.js"
></script>
<script
type=
"text/javascript"
src=
"https://staging-teach.cdn.ireadabc.com/h5template/h5-static-lib/js/air.js"
></script>
<script
type=
"text/javascript"
src=
"assets/jquery-1.11.0.min.js"
></script>
<script
type=
"text/javascript"
src=
"assets/jquery-1.11.0.min.js"
></script>
<script
type=
"text/javascript"
src=
"assets/formula-board/formula-board.js"
></script
>
<!-- <script type="text/javascript" src="assets/formula-board/formula-board.js"></script>--
>
<style>
<style>
.kf-editor
{
.kf-editor
{
/*visibility: visible!important;*/
/*visibility: visible!important;*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment