Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > StaticHTML automaticaly adding <p> Tags? View modes: 
User avatar
Certified Developer 10
Certified Developer 10
varinder-kudosweb - 8/31/2013 6:43:04 PM
   
StaticHTML automaticaly adding <p> Tags?
Guys,

For some reasons, whenever i save my code in my StaticHTML webpart, it automaticaly ( or magically ) adds empty <p> tags at the end of it

screenshots:

before saving:
User image

after saving:
User image


This is weird ( maybe its a CKeditor thing ). Well, whatever it is - its quiet annoying

User avatar
Kentico Support
Kentico Support
kentico_janh - 9/2/2013 1:58:34 AM
   
RE:StaticHTML automaticaly adding <p> Tags?
Hello,

Could you please post here the first part of the \CMSAdminControls\CKeditor\config.js file where the configuration is defined like:

    config.extraPlugins = 'CMSPlugins';
config.uiColor = '#eeeeee';
config.skin = 'kentico';
config.enterMode = CKEDITOR.ENTER_BR;
config.shiftEnterMode = CKEDITOR.ENTER_P;
config.entities_latin = true;


Best regards,
Jan Hermann

User avatar
Certified Developer 10
Certified Developer 10
varinder-kudosweb - 9/2/2013 4:23:03 AM
   
RE:StaticHTML automaticaly adding <p> Tags?
There you go mate.


config.extraPlugins = 'CMSPlugins';
config.uiColor = '#eeeeee';
config.skin = 'kentico';
config.enterMode = CKEDITOR.ENTER_BR;
config.shiftEnterMode = CKEDITOR.ENTER_P;
config.entities_latin = false;
config.protectedSource.push(/<script[\s\S]*?<\/script>/gi); // <SCRIPT> tags.


config.pasteFromWordRemoveFontStyles = false;
config.pasteFromWordRemoveStyles = false;

User avatar
Kentico Support
Kentico Support
kentico_janh - 9/2/2013 5:26:27 AM
   
RE:StaticHTML automaticaly adding <p> Tags?
Hello,

Could you please set the shiftEnterMode to use BR tags as well:

config.shiftEnterMode = CKEDITOR.ENTER_BR;


It should help according to some CK Editor forum posts.

Best regards,
Jan Hermann

User avatar
Certified Developer 10
Certified Developer 10
varinder-kudosweb - 9/2/2013 8:11:29 PM
   
RE:StaticHTML automaticaly adding <p> Tags?
Hey Man,

Thanks for digging this up for me.

Either way, break or p tags will be added at the bottom of the Editable area. Well, it seems quiet useful for content editors as they can click on empty p tag to get out the any html template they've inserted.

Varinder