CKEditor changes Vbscript code


After installing CKEditor Pluging, all my vbscript code displayed by WP-CodeBox  in my Posts showed up with converted & and > or <. One time editing was enough to change the code.


WP-CodeBox is working with a <pre> and </pre> tag encasing the script to display


edit CKEditor – configuration file ckeditor.config.js and add the following line

config.protectedSource.push( /<pre[\s\S]*?pre>/g ); // for WP-CodeBox plugin

This way CKEditor ignores all text encased by WP-CodeBox  tags.

Lines for other application code

config.protectedSource.push( /<\?[\s\S]*?\?>/g ); // PHP Code

config.protectedSource.push( /(]+>[\s|\S]*?<\/asp:[^\>]+>)|(]+\/>)/gi ); // ASP.Net Code

This entry was posted in Information Technology and tagged . Bookmark the permalink.

Comments are closed.