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?
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';
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]
};
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
Comments
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';
Thanks
config.enterMode = CKEDITOR.ENTER_BR; config.shiftEnterMode = CKEDITOR.ENTER_P;
Normal enter will add <\br >'s shift enter for <\p >'s
CKEDITOR.editorConfig = function( config ) { protectedSource: [/\{[\s\S]*?\}/gi, /<\?[\s\S]*?\?>/g] };