Jonatas Caram Posted July 12, 2017 Posted July 12, 2017 Hello my Friends, I am using the plugin of CKEditor "codesnippetgeshi" for my community why I need of programmation language specifice (Autoit) , I follow this tutorial to configure ("http://docs.ckeditor.com/#!/guide/dev_codesnippetgeshi" ) Editing the file "config.js" of CkEditor, Adding the following line of code : CKEDITOR.replace('editor1', { extraPlugins: 'codesnippetgeshi', codeSnippetGeshi_url: '../lib/colorize.php' }); However the "editor1" do not is found (I do not know what "id" I should put there) So I adding into CKEDITOR.editorConfig (inside file "config.js") CKEDITOR.editorConfig = function(a) { a.toolbarGroups = [{ name: "document", groups: ["mode", "document", "doctools"] }, { name: "clipboard", groups: ["clipboard", "undo"] }, { name: "editing", groups: ["find", "selection", "spellchecker"] }, { name: "forms" }, { name: "basicstyles", groups: ["basicstyles", "cleanup"] }, { name: "paragraph", groups: ["list", "indent", "blocks", "align", "bidi"] }, { name: "links" }, { name: "insert" }, { name: "styles" }, { name: "colors" }, { name: "tools" }, { name: "others" }, { name: "about" }]; a.removeButtons = "Cut,Copy,Paste,Undo,Redo,Anchor,Underline,Strike,Subscript,Superscript"; a.removeDialogTabs = "link:advanced" a.extraPlugins = "codesnippet,codesnippetgeshi,sourcedialog"; //add this line a.codeSnippetGeshi_url = "../lib/colorize.php"; //add this line }; And it only works when I am editing the post (image below) however when I submit the post the Syntaxe Highlight don't work (image below) Does anyone know how I'll fixe this?
Joy Rex Posted July 13, 2017 Posted July 13, 2017 I think the problem here is the syntax highlighting plugin is only working in CKEditor, and not when the posts are displayed on the site. Are the classes used for styling the code available when viewing the posts containing the code?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.