Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
Y
yn-science-front
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
徐俊
yn-science-front
Commits
39607c95
Commit
39607c95
authored
Jul 30, 2025
by
wangxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
44
parent
af7d2197
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
myEditor.vue
src/views/components/common/myEditor.vue
+4
-2
No files found.
src/views/components/common/myEditor.vue
View file @
39607c95
...
...
@@ -23,7 +23,7 @@ export default {
id
:
{
type
:
String
,
default
:
function
()
{
return
'vue-tinymce-'
+
+
new
Date
()
+
((
Math
.
random
()
*
1000
).
toFixed
(
0
)
+
''
)
return
'vue-tinymce-'
+
new
Date
()
+
((
Math
.
random
()
*
1000
).
toFixed
(
0
)
+
''
)
}
},
value
:
{
...
...
@@ -34,6 +34,7 @@ export default {
},
},
created
()
{
console
.
log
(
window
.
tinymce
.
get
(
this
.
id
),
'created'
,
this
.
id
)
},
methods
:
{
initTinymce
()
{
...
...
@@ -51,7 +52,7 @@ export default {
statusbar
:
false
,
height
:
600
,
plugins
:
'code advlist autolink link image lists preview table wordcount'
,
toolbar
:
`undo redo | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist | image | wordcount`
,
toolbar
:
`undo redo | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist | image | wordcount`
,
//| styleselect | fontsizeselect fontselect | table tabledelete | tableprops tablerowprops tablecellprops | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol
// 初始化完成回调
init_instance_callback
:
(
editor
)
=>
{
...
...
@@ -115,6 +116,7 @@ export default {
},
watch
:
{
value
(
val
)
{
console
.
log
(
window
.
tinymce
.
get
(
this
.
id
),
'watch'
,
this
.
id
)
if
(
!!
val
&&
!
this
.
hasChange
)
{
this
.
$nextTick
(()
=>
{
this
.
hasChange
=
true
...
...
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