Hello, I would like to assign a default class to all links created in CKEditor. I know it can be done using JQuery but it only effects the DOM and does not modify the permanent HTML output from the editor. Is there a quick way to do this?
Sun, 12/18/2011 - 14:59
#1

Re: How to assign default class for links
CKEDITOR.on( 'dialogDefinition', function( ev ) { // Take the dialog name and its definition from the event data. var dialogName = ev.data.name; var dialogDefinition = ev.data.definition; // Check if the definition is from the dialog window you are interested in (the "Link" dialog window). if ( dialogName == 'link' ) { // Get a reference to the "Link Advanced" tab. var advTab = dialogDefinition.getContents( 'advanced' ); var cssField = advTab.get( 'advCSSClasses' ); cssField['default'] = 'cssClass'; } });http://docs.cksource.com/CKEditor_3.x/Howto/Default_Field_Values
Re: How to assign default class for links
Documentation Manager, CKSource
See CKEditor 5 docs, CKEditor 4 docs, CKEditor 3 docs, CKFinder 3 docs, CKFinder 2 docs for help.
Visit the new CKEditor SDK for samples showcasing editor features to try out and download!