Opened 10 years ago
Closed 10 years ago
#13018 closed Bug (invalid)
ckEditor loses html tags if toolbar doesn't have button of that tag
Reported by: | mncs | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | UI : Toolbar | Version: | 4.4.7 |
Keywords: | Cc: |
Description
Hi. I'm trying render html text into a readonly ckEditor included in primefaces-extensions. For do this, use an empty toolbar to show only the text, but when I do that I lose all html tags in my text and only "<p>" tags appear.
If I add the corresponding button to the toolbar, html tag of that button appear in editor. For example if I add the "Bold" button to the toolbar, I have the "<strong>" tag in my text, but if I don't add that button the <strong>, the tag dissapears from my text.
Here is a sample My Html text: <p>This is <strong>a strong text</strong></p>
Using this, ckeditor works: pe:ckEditor id="editor" value="#{bean.getText()}" toolbar="Bold?" readOnly="true"
But if I quit the "Bold button" from the toolbar I lose the <strong> tag pe:ckEditor id="editor" value="#{bean.getText()}" toolbar="[]" readOnly="true"
This is the html of this case: <p>This is a strong text</p>
Change History (1)
comment:1 Changed 10 years ago by
Keywords: | html toolbar removed |
---|---|
Resolution: | → invalid |
Status: | new → closed |
The removeButtons config option affects also ACF.
If you want to have buttons removed but keep HTML you can either disable ACF temporarily or configure extraAllowedContent for it (I would start with that second option).
To learn more about ACF, please see: 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