Custom Toolbars

Sep 11, 2009 at 9:28 PM

Is there a way to use different custom toolbars with the wrapper control?  When I was using the FCKediter(.net version) it was a Toolbarset attribute.  Or is this something to do in the CK code.



Sep 14, 2009 at 5:35 AM

You can just specify the toolbar buttons to use directly in the Toolbar attribute, like this:

<saj:CkEditor runat="server" SkinID="FullEditor"
RemovePlugins="save,preview,newpage" ExtraPlugins="syrinxImage,syrinxCode" MinWidth="200" ExtraConfig="syrinx_siteBase:'$CmpSetting(sitePath)$'">
['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'],
['Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],
['Maximize', 'ShowBlocks','-','About']

Sep 14, 2009 at 10:19 PM

Hi Matt,

The solution above works but is a bit funky. 

The <toolbar> tag shows up in red in my editor (Visual Web Developer Express) because it says that no text can be inserted between opening and closing tags of <toolbar>

I also accidentally hit this cell when I was in design mode, template editing.  It replaced a lot of the toolbar code with the character codes so that when I viewed the page in my browser I could only see a text box.  I haven't been able to replicate this behavior, but I thought it was strange.

I did prefer the Toolbarset property in FCKeditor for setting toolbars.  CKeditor has two toolbars already programmed, Full and Basic.  It would be nice to use a property to be able to set these toolbars and also to create custom toolbars as was done in FCKeditor.  Using the above method requires a lot of copy and paste.

Oct 16, 2009 at 10:36 AM

I had the same problem but digging through the code there is a simple solution, you can pass the toolbar name like this:

<syx:CkEditor runat="server" id="ed1" ExtraConfig="toolbar: 'Basic'" />

It's simple to amend the C# code to add this as a property, too. Hope that helps.