I need to add buttons in FCKeditor for special tags: selected text should be put in
[lang_en][/lang_en]or
[lang_ru][/lang_ru]. It's for multilanguage site on wordpress. I can't write js by myself , i just can modify some code for my needs. What should i do? I think, it must be smth like buttons for styles (bold, italic and so on) or like here - code, quote... How can I realize it?
Re: Add new buttons for special tags
Please, look:
And this is my config.js:
What's wrong?
Re: Add new buttons for special tags
Remember to save this file as plugin.js, to put it in a new folder named RU (same name of your plugin) where you also put the plugin.png, and to put this new folder in the plugins folder.
If the custom button is not shown I think the problem is in the custom toolbar: did you create it? did you call correctly the custom button in it?
If your custom button is needed in just one page I think you can easily customize the standard toolbar and add the custom button to it in the webpage code (in this case you don't need to modify the config.js ).
ASP.NET example:
in .aspx file
<CKEditor:CKEditorControl ID="CKEditor_Text" runat="server" /> //This is your textarea with CKEditor
in .cs file
Page_Load(object sender, EventArgs e)
{
CKEditor_Text.config.extraPlugins = "RU"; // this is the plugin name -> CKEDITOR.plugins.add ('RU'
CKEditor_Text.config.toolbar = new object[] // add here all the buttons you want in the toolbar, ordered as you prefer
{
new object[] { "Bold", "Italic", "Underline" },
"/",
new object[] { "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyBlock" },
new object[] { "RU" }, // this is the button name -> editor.ui.addButton ('RU'
new object[] { "Styles", "Format", "Font", "FontSize", "-", "TextColor", "BGColor", "-", "Source" },
};
}
Hope this suggestion can help you
Re: Add new buttons for special tags
congig.js looks like this:
But with my Wordpress the changing and even deleting of config.js shows no result. Nothing changes - the editor looks the same. So with plugin itself everything is allright... WP plugin uses version CKeditor 3.0.1.
Re: Add new buttons for special tags
Here you should define extraPlugins and toolbar!
Well... Don't know if someone will need this info) But my problem is solved however.