OctoDev Posted March 24, 2015 Posted March 24, 2015 currently only support these, is it possible to support others like C#, C++ etc?? '
Nathan Explosion Posted March 24, 2015 Posted March 24, 2015 PBCKCODE only supports those 4 languages.Option: disable the PBCKCODE plugin and use the 'Code Snippet' plugin instead.http://sdk.ckeditor.com/samples/codesnippet.html
OctoDev Posted March 24, 2015 Author Posted March 24, 2015 PBCKCODE only supports those 4 languages.Option: disable the PBCKCODE plugin and use the 'Code Snippet' plugin instead.http://sdk.ckeditor.com/samples/codesnippet.htmlThanks, how do I swap it though? And install that.. I see some documentation on there but not for ipb
Nathan Explosion Posted March 24, 2015 Posted March 24, 2015 How to remove it.....ACP -> Customization -> Editor (Toolbars)Drag the existing code icon off the toolbar.How to add code snippet....Go to ckeditor.com and search for/download the following plugins:Line UtilitiesWidgetCode SnippetBack to the ACP as above and click the "Add Button" button.Add the above 3 items in the order listed.....Code Snippet requires Widget which requires Line Utilities, so you need to install as above.Once done, simply drag the new code snippet button up from the "Buttons not on toolbar" section up to the editor toolbar.
OctoDev Posted March 24, 2015 Author Posted March 24, 2015 I How to remove it.....ACP -> Customization -> Editor (Toolbars)Drag the existing code icon off the toolbar.How to add code snippet....Go to ckeditor.com and search for/download the following plugins:Line UtilitiesWidgetCode SnippetBack to the ACP as above and click the "Add Button" button.Add the above 3 items in the order listed.....Code Snippet requires Widget which requires Line Utilities, so you need to install as above.Once done, simply drag the new code snippet button up from the "Buttons not on toolbar" section up to the editor toolbar.I uploaded these three to /public/applications/core/interface/ckeditor/ckeditor/pluginsI went back to my ACP and tried to look for the button but i dont, i see that i can add buttons via zip.. so i tried to upload any of the zips but it erroed..
Nathan Explosion Posted March 24, 2015 Posted March 24, 2015 I uploaded these three to /public/applications/core/interface/ckeditor/ckeditor/pluginsI went back to my ACP and tried to look for the button but i dont, i see that i can add buttons via zip.. so i tried to upload any of the zips but it erroed..Which is totally not the way to do it - use my instructions to upload the files, do not manually upload them as you have.Go back and delete the files you uploaded to /public/applications/core/interface/ckeditor/ckeditor/plugins and start again as I described it.
OctoDev Posted March 24, 2015 Author Posted March 24, 2015 Which is totally not the way to do it - use my instructions to upload the files, do not manually upload them as you have.Go back and delete the files you uploaded to /public/applications/core/interface/ckeditor/ckeditor/plugins and start again as I described it.yeah works now xD
OctoDev Posted March 24, 2015 Author Posted March 24, 2015 Perfecto!You don't by any chance know how I can swap between ENTER & SHIFT+ENTER?So basically enter is normal <br> and shift+enter is <p> ?:P
Nathan Explosion Posted March 24, 2015 Posted March 24, 2015 http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-enterModeconfig.js is located in applications/core/interface/ckeditor/ckeditor
OctoDev Posted March 25, 2015 Author Posted March 25, 2015 http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-enterModeconfig.js is located in applications/core/interface/ckeditor/ckeditoryeah ive been taking a look at that but not sure what to do....
Nathan Explosion Posted March 25, 2015 Posted March 25, 2015 What are you not sure about exactly? I could hold your hand further here, but I like to encourage people to figure things out themselves....to me, that documentation is pretty clear in that you edit the file I mentioned and you add in the configuration setting you want to use.What is not clear?
OctoDev Posted March 25, 2015 Author Posted March 25, 2015 What are you not sure about exactly? I could hold your hand further here, but I like to encourage people to figure things out themselves....to me, that documentation is pretty clear in that you edit the file I mentioned and you add in the configuration setting you want to use. What is not clear? I can't find what to replace or what to edit in the config file or the other .js I want to replace so basically normal enter is br and enter + shift is <p> that way it works and makes more sense towards my members.., i think its way different doing it on ipboard 4.0 as they customized that file it seems found some old articles from years back, they also didnt work
Nathan Explosion Posted March 26, 2015 Posted March 26, 2015 That link directs you to the configuration setting to control what happens when ENTER is pressed.The default in CKEditor is <p></p>, which means that the following configuration is in effect:config.enterMode = CKEDITOR.ENTER_P;So, to change it to <br>...The config.js is not "customised" - it is actually just configured as per ckeditor documentation. http://docs.ckeditor.com/#!/guide/dev_configuration has a section called "Using the config.js" file which shows how to use the CKEDITOR.editorConfig function to describe what configuration to use for the editor.Now, the problem may be that the documentation says to add config.enterMode = CKEDITOR_ENTER_BR to the config.js, but if you don't know how the config.js is structured then the question of "where" comes up.It's quite simple once you clear up a slight difference....CKEDITOR documentation for editorConfig shows this as a structure: CKEDITOR.editorConfig = function( config ) { config.language = 'fr'; config.uiColor = '#AADC6E'; };Default IPS config.js has this as the structure: 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"};Let's make it easier to read.... /* Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ 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" }; [/code]So where is the 'config' bit? It's called 'a' in the IPS config.js fileCKEDITOR = CKEDITOR.editorConfig = function( config )IPS = CKEDITOR.editorConfig = function( a )So instead of adding config.enterMode = CKEDITOR.ENTER_BR; to the file, you add a.enterMode = CKEDITOR.ENTER_BR; (AND ENSURE YOU'VE CLOSED OFF THE PREVIOUS LINE WITH A ";")Once done, save & replace the file, refresh the page and magic.Now, how do you modify the Shift+Enter combination?? Guess what....http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-shiftEnterModeThat defaults to <br>
OctoDev Posted March 26, 2015 Author Posted March 26, 2015 That link directs you to the configuration setting to control what happens when ENTER is pressed.The default in CKEditor is <p></p>, which means that the following configuration is in effect:config.enterMode = CKEDITOR.ENTER_P;So, to change it to <br>...The config.js is not "customised" - it is actually just configured as per ckeditor documentation. http://docs.ckeditor.com/#!/guide/dev_configuration has a section called "Using the config.js" file which shows how to use the CKEDITOR.editorConfig function to describe what configuration to use for the editor.Now, the problem may be that the documentation says to add config.enterMode = CKEDITOR_ENTER_BR to the config.js, but if you don't know how the config.js is structured then the question of "where" comes up.It's quite simple once you clear up a slight difference....CKEDITOR documentation for editorConfig shows this as a structure: CKEDITOR.editorConfig = function( config ) { config.language = 'fr'; config.uiColor = '#AADC6E'; };Default IPS config.js has this as the structure: 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"};Let's make it easier to read.... /* Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ 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" }; [/code]So where is the 'config' bit? It's called 'a' in the IPS config.js fileCKEDITOR = CKEDITOR.editorConfig = function( config )IPS = CKEDITOR.editorConfig = function( a )So instead of adding config.enterMode = CKEDITOR.ENTER_BR; to the file, you add a.enterMode = CKEDITOR.ENTER_BR; (AND ENSURE YOU'VE CLOSED OFF THE PREVIOUS LINE WITH A ";")Once done, save & replace the file, refresh the page and magic.Now, how do you modify the Shift+Enter combination?? Guess what....http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-shiftEnterModeThat defaults to <br>I still don't understand it. Can someone just provide me a file instead of trying to learn me Javascript?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.