I must configure CKEditor to add a class-attribute to every p-tag in the content. You can do something similar with config.format_p but it will only apply the class-attribute to text that is marked as "normal" which is not default.
Edit:
I’m using the current version 3.6.2. Here are the relevant parts of my config:
CKEDITOR.editorConfig = function( config )
{
config.removeFormatTags = 'b,div,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var,form,input,textarea';
config.format_p =
{
element: 'p',
attributes:
{
'class': 'tiny_p'
}
};
config.skin = "office2003";
config.entities_processNumerical = true;
}
The config.format_p option only takes effect when user chooses "normal" from format-menu and config.removeFormatTags only works when user manually clicks the clean-button. Both should work automatically like it does in TinyMCE.
You can add html processor filter
Also, if it is not required to be created as ckedito plugin maybe before you send content to server you can use jQuery to change content
or, if textarea (source) is active
you should tweak a bit
.replace(/<p>/gi, "<p class='thiny_p'>")regular expression to support other cases.EDIT
Finally got time to download and setup editor on my box, here is working plugin
put it in
plugins/customparagraph/plugin.jsalso create icon image
plugins/customparagraph/images/icon.gifin configuration you will have to add following configuration options config.js of you CKEdito installation
OR
in page which loads CKEditor
User will have to click on toolbar button before save