Opened 14 years ago
Closed 13 years ago
#7580 closed Bug (expired)
div contenteditable + removeFormatCmd + insertHtml
Reported by: | pgteam | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.5.2 |
Keywords: | Cc: |
Description
i tried to use removeFormat command followed by insertHtml for ensuring inserted html will not be formated by previous styling. . . .
so i tried this case. . <div contenteditable="false"> some dummy text</div> <p>this statement <b>will</b> be removed</p>
after i selected whole sentence(included the front most space if any) right below the <div> tag and then i call myFunction from some button which look like
function myFunction (){ //instance already created with the name 'editor1' CKEDITOR.instances.editor1.execCommand( 'removeFormat' ); insertHtml("<p>text to be inserted</p>"); }
Obviously, myFunction can be called, format of selected text can be removed, at last, insertHtml can't perform. . .
I discovered that it occurs, only when contenteditable is defined with the combination of removeFormatCmd + InsertHtml with the situation i described above...
It wouldn't happen if contenteditable is defined and then just InsertHtml...
Is there any contradiction among contenteditable attribute, removeFormat Command and insertHtml???
Change History (2)
comment:1 Changed 14 years ago by
Status: | new → pending |
---|
comment:2 Changed 13 years ago by
Resolution: | → expired |
---|---|
Status: | pending → closed |
I have tried to use your code (improved it a little):
in latest stable version 3.6 and in the one you mentioned 3.5.2. InsertHTML works as it should.
Could it be that you have forgotten to add
before the function or you can still reproduce the issue with the above code in clean version of CKEditor?