Opened 9 years ago
Closed 9 years ago
#14255 closed Bug (worksforme)
Insert html does not work
Reported by: | newdegate | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 4.5.1 |
Keywords: | Cc: |
Description
Steps to reproduce
- d=CKEDITOR.instances.id_body
- d.insertHtml('<p class=\x22text-uppercase\x22>test</p>')
- CKEDITOR.instances.id_body.getData();
Expected result
<p class=text-uppercase>test</p>
Actual result
<p>test</p>
Other details (browser, OS, CKEditor version, installed plugins)
Change History (3)
comment:1 Changed 9 years ago by
comment:2 Changed 9 years ago by
Please ignore the above - the solution which now works is:
var v=CKEDITOR.instances.id_body.getSelectedHtml() var d=CKEDITOR.instances.id_body
var html = "<span class='text-capitalize' style='text-transform:capitalize'>" + text + "</span>";
var newElement = CKEDITOR.dom.element.createFromHtml( html, d.document ); d.insertElement( newElement );
comment:3 Changed 9 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Please also note - the ckeditor version = 4.5.1