I have multiple "CKEditor" editors on the same page. And now I observe strange behavior.
For example, I am initializing CKEditor to the p
tag. And this works:
That is, I delete the text, but the first p
tag of this kind is always kept:
<p data-placeholder="Type some text...">...</p>
But the documentation always contains this example:
<div id="editor"></div>
I change the p
tag to div
and I get this:
Above, when deleting text, this code is removed:
<p data-placeholder="Type some text...">...</p>
But if remove the focus from the field, then the tag p
appears again:
Has anyone encountered similar behavior?
I'm using Vue. And I used v-html
to render the original values. That was the problem. I fixed the problem using the setData
method from CKEditor.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.