Editor adds tags

edited April 2012 in Bug Reports
I am new to Fuel CMS so apologies is this is basic user error:
When I edit text content using the WYSIWYG editor (e.g. a quote in the demo app), the editor always adds a
<P>
tag when the content is saved.
e.g. Laugh it up fuzzball. becomes
<P>Laugh it up fuzzball.</P>
with the consequent rendering issues. How can I prevent this from happening?

Thanks

Comments

  • edited 4:13AM
    It has to do with CKEditor automatically adding those tags before saving. We think it has something to do with the protectedSource configuration setting in CKEditor not working properly. It looks like they just released a new version 2 days ago and so we will look at updating that with the next release.

    You can use the markItUp! editor instead by changing the "text_editor" property in fuel/applications/config/MY_fuel.php to:
    $config["text_editor'] = 'markitup';
  • edited 4:13AM
    Thanks for the quick reply. Nice to know I'm not going mad - I've switched to markitup for now.

    Thanks
  • edited April 2012
    You can over write the enterMode with:

    config.enterMode = CKEDITOR.ENTER_BR; config.shiftEnterMode = CKEDITOR.ENTER_P;

    Normal enter will add <\br >'s shift enter for <\p >'s
  • edited 4:13AM
    You can also try adding the following to the fuel/modules/fuel/assets/js/editors/ckeditor/config.js
    CKEDITOR.editorConfig = function( config ) { protectedSource: [/\{[\s\S]*?\}/gi, /<\?[\s\S]*?\?>/g] };
  • edited 4:13AM
    The JS change had no effect I'm afraid - it still adds that para tags whenever I save a change. I have to switch to the "view source" mode and manually remove the tags before saving :(
  • edited 4:13AM
    Try downloading the latest version of CKEditor and adding it to: fuel/modules/fuel/assets/js/editors/ckeditor/
Sign In or Register to comment.