|
Default toolbar profile with custom button
Last post 11-19-2013, 4:05 AM by Floris246. 3 replies.
-
11-13-2013, 4:26 AM |
-
Floris246
-
-
-
Joined on 11-13-2013
-
-
Posts 8
-
-
|
Default toolbar profile with custom button
Hi! I'm doing my best to add a custom button to the default toolbar of Ritch Text Editor but so far it hasn't worked. In the custom button example 1 (vb.net) I seem to be able to add a custom button only when I use code that creates an entire new toolbar. Like this:
<script runat="server"> Protected Overloads Overrides Sub OnInit(ByVal e As EventArgs) MyBase.OnInit(e) Editor1.ToolbarItems = "{bold,italic,underlinemenu}{forecolor,backcolor,fontname,fontsize}{justifyleft,justifycenter,justifyright,justifyfull}{insertorderedlist,insertunorderedlist,outdent,indent}{insertlink,insertimage,insertblockquote,syntaxhighlighter}{unlink,removeformat}//{mybutton1}" End Sub </script>
But what I like to do is this: Editor1.ToolbarItems = Editor1.ToolbarItems + "//{mybutton1}"
EXTENDING the default toolbar (same as I'm typing in right now) with a custom button. Just after the Google Map button. So how to do this? Thanks!
|
|
-
-
11-18-2013, 6:04 AM |
-
Kenneth
-
-
-
Joined on 02-13-2008
-
-
Posts 3,886
-
-
|
Re: Default toolbar profile with custom button
Hi Floris246, The Rich TextEditor default toolbar is "ribbon", so please open file "\richtexteditor\scripts\config.js", find the ribbon toolbar defind section below - "ribbon": "<@COMMON,ribbonpaste,pastetext,pasteword,{save,new,print,spellcheck}{cut,copy,delete,find}{undo,redo|formatpainter}><@FORMAT,[fontname,fontsize]{bold,italic,underlinemenu|forecolor,backcolor}{superscript,subscript,changecase|removeformat,cleancode,selectall}><@PARAGRAPHS,[paragraphs,styles]{justifymenu,lineheight,ltr,rtl,insertlinemenu}{insertorderedlist,insertunorderedlist,outdent,indent,insertblockquote}><@INSERT,ribbontable,insertgallery,insertimage,{insertform,insertbox,insertlayer,insertfieldset,fullscreen,toggleborder,pageproperties,help}{insertlink,unlink,insertanchor,insertimagemap,insertdate,insertchars,virtualkeyboard}{inserttemplate,insertdocument,insertvideo,syntaxhighlighter,insertyoutube,html5,googlemap}>",
And add your custom button name for this section "ribbon": "<@COMMON,ribbonpaste,pastetext,pasteword,{save,new,print,spellcheck}{cut,copy,delete,find}{undo,redo|formatpainter}><@FORMAT,[fontname,fontsize]{bold,italic,underlinemenu|forecolor,backcolor}{superscript,subscript,changecase|removeformat,cleancode,selectall}><@PARAGRAPHS,[paragraphs,styles]{justifymenu,lineheight,ltr,rtl,insertlinemenu}{insertorderedlist,insertunorderedlist,outdent,indent,insertblockquote}><@INSERT,ribbontable,insertgallery,insertimage,{insertform,insertbox,insertlayer,insertfieldset,fullscreen,toggleborder,pageproperties,help}{insertlink,unlink,insertanchor,insertimagemap,insertdate,insertchars,virtualkeyboard}{inserttemplate,insertdocument,insertvideo,syntaxhighlighter,insertyoutube,html5,googlemap,mybutton1}>", Regards, Ken
|
|
-
11-19-2013, 4:05 AM |
-
Floris246
-
-
-
Joined on 11-13-2013
-
-
Posts 8
-
-
|
Re: Default toolbar profile with custom button
Yes, it works. Thank you!
|
|
|
|
|