{Array} CKEDITOR.config.protectedSourceList of regular expressions to be executed over the input HTML, indicating code that must stay untouched.
I'm no expert on regular expressions but something like this should do the trick:
config.protectedSource.push(/[^<]*(<h1>([^<]+)<\/h1>)/g);
You can add attribute contenteditable=false to the tag. E.g.
ckeditor.insertHtml('<h1 contenteditable="false">Not editable text</h1>');
http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.protectedSourceconfig.protectedSource.push( /<\?[\s\S]*?\?>/g ); // PHP code config.protectedSource.push( /<%[\s\S]*?%>/g ); // ASP code config.protectedSource.push( /(]+>[\s|\S]*?<\/asp:[^\>]+>)|(]+\/>)/gi ); // ASP.Net code |
No comments:
Post a Comment