Yes, it looks like TinyMceSettings does not have methods to remove the
toolbars. I'll add those as soon as TeamCity deploys jars again... But
you could work around that by adding a method overload for
toJavaScript() to your custom MyTinyMceSettings, something like:
public String toJavaScript(Mode mode, Collection<Component>
components) {
StringBuffer buffer = new StringBuffer(super.toJavaScript(mode,
components));
buffer.append(",\n\ttheme_advanced_buttons2: \"\"");
buffer.append(",\n\ttheme_advanced_buttons3: \"\"");
return buffer.toString();
}
Then you can also remove most of your disableButton calls. Or use the
simple theme instead.
On Tue, 9 Dec 2008 14:06:54 -0800 (PST), "jchappelle"
<[EMAIL PROTECTED]> wrote:
>
> I downloaded the latest snapshot from the wicket-stuff repository and did
> the
> setStatusbarLocation(null) and that fixed that problem. However, now I
> have
> three toolbars in the top instead of one. All of my buttons are on the
> top
> toolbar but underneath it is two others that only have separators in them
> so
> it looks pretty weird. Here is my custom settings class:
>
> public class MyTinyMceSettings extends TinyMCESettings
> {
> private static final long serialVersionUID = 1L;
>
> public MyTinyMceSettings ()
> {
> super(TinyMCESettings.Theme.advanced);
>
> add(TinyMCESettings.bullist, TinyMCESettings.Toolbar.first,
> TinyMCESettings.Position.after);
> add(TinyMCESettings.numlist, TinyMCESettings.Toolbar.first,
> TinyMCESettings.Position.after);
>
> disableButton(TinyMCESettings.styleselect);
> disableButton(TinyMCESettings.sub);
> disableButton(TinyMCESettings.sup);
> disableButton(TinyMCESettings.charmap);
> disableButton(TinyMCESettings.image);
> disableButton(TinyMCESettings.anchor);
> disableButton(TinyMCESettings.help);
> disableButton(TinyMCESettings.code);
> disableButton(TinyMCESettings.link);
> disableButton(TinyMCESettings.unlink);
> disableButton(TinyMCESettings.formatselect);
> disableButton(TinyMCESettings.indent);
> disableButton(TinyMCESettings.outdent);
> disableButton(TinyMCESettings.undo);
> disableButton(TinyMCESettings.redo);
> disableButton(TinyMCESettings.cleanup);
> disableButton(TinyMCESettings.hr);
> disableButton(TinyMCESettings.visualaid);
> disableButton(TinyMCESettings.separator);
> disableButton(TinyMCESettings.formatselect);
> disableButton(TinyMCESettings.removeformat);
>
> setToolbarAlign(TinyMCESettings.Align.left);
> setToolbarLocation(TinyMCESettings.Location.top);
> setStatusbarLocation(null);
> setVerticalResizing(true);
> setHorizontalResizing(true);
> }
> }
> Any idea of how to remove those toolbars?
>
> Thanks,
>
> Josh
>
>
> pointbreak+wicketstuff wrote:
> >
> > You seem to be using an old version of tinymce. AFAIK, the latest
> > version does not use "mode: specific_textareas", but "mode: exact" in
> > the tinyMCE.init call. Update to the latest version, and you should be
> > fine I guess.
> >
> > You can remove the statusbar via
> > TinyMceSettings.setStatusbarLocation(null) (which by the way is the
> > default). See
> > http://wiki.moxiecode.com/index.php/TinyMCE:Configuration#Layout for a
> > comprehensive list and documentation on all available options.
> >
> >
> > On Mon, 8 Dec 2008 10:45:40 -0800 (PST), "jchappelle"
> > <[EMAIL PROTECTED]> wrote:
> >>
> >> I have a TinyMCE component in one of my pages and I am trying to remove
> >> the
> >> "Path:" toolbar at the bottom. I have noticed that the init method
> >> renders
> >> on my page twice. I only have one textarea on my page and I am adding a
> >> custom TinyMceBehavior to it. I am trying to disable the visualaid
> >> button(i
> >> assume that is how you remove the Path: at the bottom). On one of the
> >> init
> >> methods rendered it has that button disabled and on the other one it
> >> doesn't. I wonder if that could be causing it. Here is part of the html
> >> rendered:
> >>
> >> tinyMCE.init({
> >> mode : "specific_textareas",
> >> editor_selector : "70fa4bd0-497a-4eb3-8de5-a3fbc13bedf3",
> >> theme : "advanced",
> >> language : "en",
> >> plugins : "contextmenu, save, paste, searchreplace, insertdatetime,
> >> preview, zoom, table, emotions, iespell, flash, print, directionality,
> >> fullscreen",
> >> theme_advanced_buttons1_add_before : "save, newdocument, separator",
> >> theme_advanced_buttons1_add : "fontselect, fontsizeselect",
> >> theme_advanced_buttons2_add_before: "cut, copy, paste, pastetext,
> >> pasteword, separator, search, replace, separator",
> >> theme_advanced_buttons2_add : "separator, inserttime, insertdate,
> >> separator, preview, zoom, separator, forecolor, backcolor",
> >> theme_advanced_buttons3_add_before : "tablecontrols",
> >> theme_advanced_buttons3_add : "emotions, iespell, flash, separator,
> >> print,
> >> separator, ltr, rtl, separator, fullscreen",
> >> theme_advanced_toolbar_location : "top",
> >> theme_advanced_statusbar_location : "bottom",
> >> theme_advanced_toolbar_align : "left",
> >> theme_advanced_resizing : true,
> >> theme_advanced_resize_horizontal : false,
> >> plugin_insertdate_timeFormat : "Time: %H:%M",
> >> plugin_insertdate_dateFormat : "Date: %m-%d-%Y",
> >> fullpage_default_xml_pi : "false"
> >> });
> >>
> >> /*-->]]>*/</script>
> >>
> >> <script type="text/javascript" id="init"><!--/*--><![CDATA[/*><!--*/
> >> tinyMCE.init({
> >> mode : "specific_textareas",
> >> editor_selector : "679c2b60-3c42-47e0-986e-3d653f7a28d6",
> >> theme : "advanced",
> >> language : "en",
> >> theme_advanced_disable : "styleselect, sub, sup, charmap, image, anchor,
> >> help, code, link, unlink, formatselect, bullist, numlist, indent,
> >> outdent,
> >> undo, redo, cleanup, hr, visualaid, separator, removeformat",
> >> theme_advanced_buttons1_add : "bullist, numlist",
> >> theme_advanced_toolbar_location : "top",
> >> theme_advanced_statusbar_location : "bottom",
> >> theme_advanced_toolbar_align : "left",
> >> theme_advanced_resizing : true,
> >> theme_advanced_resize_horizontal : true
> >> });
> >>
> >> Could someone please help?
> >>
> >> Thanks,
> >>
> >> Josh
> >> --
> >> View this message in context:
> >> http://www.nabble.com/TinyMCE-init-method-rendering-twice-tp20901160p20901160.html
> >> Sent from the Wicket - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/TinyMCE-init-method-rendering-twice-tp20901160p20924708.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]