Opened 9 years ago
Closed 9 years ago
#14266 closed Bug (invalid)
Click events lost
Reported by: | Dhana | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 4.5.4 |
Keywords: | Cc: |
Description
Steps to reproduce
- editor.insertHtml is used in my code to insert span element with onclick attribute there.
- Switch to 'Source' in toolbar, click on it again to see the editor area
- Now we have lost the click event, clicking span element no longer triggers click event.
Expected result
Actual result
Other details (browser, OS, CKEditor version, installed plugins)
Change History (2)
comment:1 Changed 9 years ago by
comment:2 Changed 9 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
You need to learn about ACF:
http://docs.ckeditor.com/#!/guide/dev_acf
http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter
http://docs.ckeditor.com/#!/guide/dev_disallowed_content
http://docs.ckeditor.com/#!/api/CKEDITOR.filter-method-addTransformations
http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-allowedContent
http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-extraAllowedContent
http://nightly.ckeditor.com/14-03-20-07-05/full/samples/datafiltering.html
This configuration prevents removing onclick
handler:
var editor = CKEDITOR.replace( 'editor1', { extraAllowedContent : '*[onclick]' });
Please also note that onclick will not work in design mode (for security reasons). You need to preview the page in order to see result.
Also, when I saved the ckeditor content, reload the page, all the click events are lost.