You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Alec Swan <al...@gmail.com> on 2013/07/22 07:47:37 UTC
TinyMCE & Twitter Bootstrap Toggle
Hello,
I have a bootstrap toggle button which the user can use to open and close
TinyMCE editor. When the page is rendered I would like the TinyMCE editor
to be closed and when user clicks on the toggle button - open.
Note that twitter bootstrap button needs to know
TinyMCE#getAjaxRegionMarkupId(area) in order to use it in
toggle-target='xxx' attribute to toggle it.
Is there a way to configure TinyMceBehavior to render hidden by default?
Any other ideas on how I can get this solved?
Thanks,
Alec
Re: TinyMCE & Twitter Bootstrap Toggle
Posted by Andrea Del Bene <an...@gmail.com>.
ver 1.5.9.1 is the latest one. Look here:
http://mvnrepository.com/artifact/org.wicketstuff/wicketstuff-tinymce
> I noticed that TinyMce plugin in WicketStuff 1.5.9.1 packages an old
> version of TinyMce. Does anybody know what is the latest TinyMce Wicket
> plugin release compatible with Wicket 1.5.9?
>
> Thanks,
>
> Alec
>
>
> On Tue, Jul 23, 2013 at 2:13 PM, Alec Swan <al...@gmail.com> wrote:
>
>> I am on Wicket 1.5.9 using WicketStuff 1.5.9.1.
>>
>> I ended up overriding TinyMceBehavior#beforeRender in order to inject
>> class="collapse" on the TinyMCE wrapper DIV. Can you think of a cleaner
>> solution?
>>
>> @Override
>> public void beforeRender(Component component)
>> {
>> // see super#beforeRender(Component)
>> component.getResponse().write(String.format("<div
>> id=\"%s\" class=\"collapse\">", getAjaxRegionMarkupId(component))); //
>> collapse html editor by default
>> }
>>
>> Thanks,
>>
>> Alec
>>
>>
>> On Tue, Jul 23, 2013 at 9:52 AM, Andrea Del Bene <an...@gmail.com>wrote:
>>
>>> Which version of Wicket/WicketStuff are you using?
>>>> Andrea, thank you for a good pointer. The thing I am struggling with is
>>>> adding class="collapse" to the xxx_wrapper_component which seems to be
>>>> created by TinyMCE JavaScript after my Wicket code can add
>>>> AttributeModifier or even invoke $('#" + getAjaxRegionMarkupId() +
>>>> "').css('class', 'collapse');".
>>>>
>>>> It seems like the class gets set by right after that is erased by
>>> TinyMCE.
>>>> Any ideas how I can run my code that sets CSS class of mce wrapper div
>>>> after tinyMce.init()?
>>>>
>>>> Thanks,
>>>>
>>>> Alec
>>>>
>>>>
>>>> On Mon, Jul 22, 2013 at 1:30 AM, Andrea Del Bene <an.delbene@gmail.com
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> you can have a look at InPlaceEditComponent which is used in the
>>> example
>>>>> page InlineTinyMCEPage (see code at
>>>>>
>>>>>
>>> https://github.com/wicketstuff/core/blob/master/jdk-1.6-parent/tinymce-parent/tinymce-examples/src/main/java/wicket/contrib/examples/tinymce/InlineTinyMCEPage.java
>>>>> )
>>>>>> Hello,
>>>>>>
>>>>>> I have a bootstrap toggle button which the user can use to open and
>>> close
>>>>>> TinyMCE editor. When the page is rendered I would like the TinyMCE
>>> editor
>>>>>> to be closed and when user clicks on the toggle button - open.
>>>>>>
>>>>>> Note that twitter bootstrap button needs to know
>>>>>> TinyMCE#getAjaxRegionMarkupId(area) in order to use it in
>>>>>> toggle-target='xxx' attribute to toggle it.
>>>>>>
>>>>>> Is there a way to configure TinyMceBehavior to render hidden by
>>> default?
>>>>>> Any other ideas on how I can get this solved?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Alec
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: TinyMCE & Twitter Bootstrap Toggle
Posted by Alec Swan <al...@gmail.com>.
I noticed that TinyMce plugin in WicketStuff 1.5.9.1 packages an old
version of TinyMce. Does anybody know what is the latest TinyMce Wicket
plugin release compatible with Wicket 1.5.9?
Thanks,
Alec
On Tue, Jul 23, 2013 at 2:13 PM, Alec Swan <al...@gmail.com> wrote:
> I am on Wicket 1.5.9 using WicketStuff 1.5.9.1.
>
> I ended up overriding TinyMceBehavior#beforeRender in order to inject
> class="collapse" on the TinyMCE wrapper DIV. Can you think of a cleaner
> solution?
>
> @Override
> public void beforeRender(Component component)
> {
> // see super#beforeRender(Component)
> component.getResponse().write(String.format("<div
> id=\"%s\" class=\"collapse\">", getAjaxRegionMarkupId(component))); //
> collapse html editor by default
> }
>
> Thanks,
>
> Alec
>
>
> On Tue, Jul 23, 2013 at 9:52 AM, Andrea Del Bene <an...@gmail.com>wrote:
>
>> Which version of Wicket/WicketStuff are you using?
>> > Andrea, thank you for a good pointer. The thing I am struggling with is
>> > adding class="collapse" to the xxx_wrapper_component which seems to be
>> > created by TinyMCE JavaScript after my Wicket code can add
>> > AttributeModifier or even invoke $('#" + getAjaxRegionMarkupId() +
>> > "').css('class', 'collapse');".
>> >
>> > It seems like the class gets set by right after that is erased by
>> TinyMCE.
>> >
>> > Any ideas how I can run my code that sets CSS class of mce wrapper div
>> > after tinyMce.init()?
>> >
>> > Thanks,
>> >
>> > Alec
>> >
>> >
>> > On Mon, Jul 22, 2013 at 1:30 AM, Andrea Del Bene <an.delbene@gmail.com
>> >wrote:
>> >
>> >> Hi,
>> >>
>> >> you can have a look at InPlaceEditComponent which is used in the
>> example
>> >> page InlineTinyMCEPage (see code at
>> >>
>> >>
>> https://github.com/wicketstuff/core/blob/master/jdk-1.6-parent/tinymce-parent/tinymce-examples/src/main/java/wicket/contrib/examples/tinymce/InlineTinyMCEPage.java
>> >> )
>> >>> Hello,
>> >>>
>> >>> I have a bootstrap toggle button which the user can use to open and
>> close
>> >>> TinyMCE editor. When the page is rendered I would like the TinyMCE
>> editor
>> >>> to be closed and when user clicks on the toggle button - open.
>> >>>
>> >>> Note that twitter bootstrap button needs to know
>> >>> TinyMCE#getAjaxRegionMarkupId(area) in order to use it in
>> >>> toggle-target='xxx' attribute to toggle it.
>> >>>
>> >>> Is there a way to configure TinyMceBehavior to render hidden by
>> default?
>> >>> Any other ideas on how I can get this solved?
>> >>>
>> >>> Thanks,
>> >>>
>> >>> Alec
>> >>>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> >> For additional commands, e-mail: users-help@wicket.apache.org
>> >>
>> >>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
Re: TinyMCE & Twitter Bootstrap Toggle
Posted by Alec Swan <al...@gmail.com>.
I am on Wicket 1.5.9 using WicketStuff 1.5.9.1.
I ended up overriding TinyMceBehavior#beforeRender in order to inject
class="collapse" on the TinyMCE wrapper DIV. Can you think of a cleaner
solution?
@Override
public void beforeRender(Component component)
{
// see super#beforeRender(Component)
component.getResponse().write(String.format("<div id=\"%s\"
class=\"collapse\">", getAjaxRegionMarkupId(component))); // collapse html
editor by default
}
Thanks,
Alec
On Tue, Jul 23, 2013 at 9:52 AM, Andrea Del Bene <an...@gmail.com>wrote:
> Which version of Wicket/WicketStuff are you using?
> > Andrea, thank you for a good pointer. The thing I am struggling with is
> > adding class="collapse" to the xxx_wrapper_component which seems to be
> > created by TinyMCE JavaScript after my Wicket code can add
> > AttributeModifier or even invoke $('#" + getAjaxRegionMarkupId() +
> > "').css('class', 'collapse');".
> >
> > It seems like the class gets set by right after that is erased by
> TinyMCE.
> >
> > Any ideas how I can run my code that sets CSS class of mce wrapper div
> > after tinyMce.init()?
> >
> > Thanks,
> >
> > Alec
> >
> >
> > On Mon, Jul 22, 2013 at 1:30 AM, Andrea Del Bene <an.delbene@gmail.com
> >wrote:
> >
> >> Hi,
> >>
> >> you can have a look at InPlaceEditComponent which is used in the example
> >> page InlineTinyMCEPage (see code at
> >>
> >>
> https://github.com/wicketstuff/core/blob/master/jdk-1.6-parent/tinymce-parent/tinymce-examples/src/main/java/wicket/contrib/examples/tinymce/InlineTinyMCEPage.java
> >> )
> >>> Hello,
> >>>
> >>> I have a bootstrap toggle button which the user can use to open and
> close
> >>> TinyMCE editor. When the page is rendered I would like the TinyMCE
> editor
> >>> to be closed and when user clicks on the toggle button - open.
> >>>
> >>> Note that twitter bootstrap button needs to know
> >>> TinyMCE#getAjaxRegionMarkupId(area) in order to use it in
> >>> toggle-target='xxx' attribute to toggle it.
> >>>
> >>> Is there a way to configure TinyMceBehavior to render hidden by
> default?
> >>> Any other ideas on how I can get this solved?
> >>>
> >>> Thanks,
> >>>
> >>> Alec
> >>>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> For additional commands, e-mail: users-help@wicket.apache.org
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
Re: TinyMCE & Twitter Bootstrap Toggle
Posted by Andrea Del Bene <an...@gmail.com>.
Which version of Wicket/WicketStuff are you using?
> Andrea, thank you for a good pointer. The thing I am struggling with is
> adding class="collapse" to the xxx_wrapper_component which seems to be
> created by TinyMCE JavaScript after my Wicket code can add
> AttributeModifier or even invoke $('#" + getAjaxRegionMarkupId() +
> "').css('class', 'collapse');".
>
> It seems like the class gets set by right after that is erased by TinyMCE.
>
> Any ideas how I can run my code that sets CSS class of mce wrapper div
> after tinyMce.init()?
>
> Thanks,
>
> Alec
>
>
> On Mon, Jul 22, 2013 at 1:30 AM, Andrea Del Bene <an...@gmail.com>wrote:
>
>> Hi,
>>
>> you can have a look at InPlaceEditComponent which is used in the example
>> page InlineTinyMCEPage (see code at
>>
>> https://github.com/wicketstuff/core/blob/master/jdk-1.6-parent/tinymce-parent/tinymce-examples/src/main/java/wicket/contrib/examples/tinymce/InlineTinyMCEPage.java
>> )
>>> Hello,
>>>
>>> I have a bootstrap toggle button which the user can use to open and close
>>> TinyMCE editor. When the page is rendered I would like the TinyMCE editor
>>> to be closed and when user clicks on the toggle button - open.
>>>
>>> Note that twitter bootstrap button needs to know
>>> TinyMCE#getAjaxRegionMarkupId(area) in order to use it in
>>> toggle-target='xxx' attribute to toggle it.
>>>
>>> Is there a way to configure TinyMceBehavior to render hidden by default?
>>> Any other ideas on how I can get this solved?
>>>
>>> Thanks,
>>>
>>> Alec
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: TinyMCE & Twitter Bootstrap Toggle
Posted by Alec Swan <al...@gmail.com>.
Andrea, thank you for a good pointer. The thing I am struggling with is
adding class="collapse" to the xxx_wrapper_component which seems to be
created by TinyMCE JavaScript after my Wicket code can add
AttributeModifier or even invoke $('#" + getAjaxRegionMarkupId() +
"').css('class', 'collapse');".
It seems like the class gets set by right after that is erased by TinyMCE.
Any ideas how I can run my code that sets CSS class of mce wrapper div
after tinyMce.init()?
Thanks,
Alec
On Mon, Jul 22, 2013 at 1:30 AM, Andrea Del Bene <an...@gmail.com>wrote:
> Hi,
>
> you can have a look at InPlaceEditComponent which is used in the example
> page InlineTinyMCEPage (see code at
>
> https://github.com/wicketstuff/core/blob/master/jdk-1.6-parent/tinymce-parent/tinymce-examples/src/main/java/wicket/contrib/examples/tinymce/InlineTinyMCEPage.java
> )
> > Hello,
> >
> > I have a bootstrap toggle button which the user can use to open and close
> > TinyMCE editor. When the page is rendered I would like the TinyMCE editor
> > to be closed and when user clicks on the toggle button - open.
> >
> > Note that twitter bootstrap button needs to know
> > TinyMCE#getAjaxRegionMarkupId(area) in order to use it in
> > toggle-target='xxx' attribute to toggle it.
> >
> > Is there a way to configure TinyMceBehavior to render hidden by default?
> > Any other ideas on how I can get this solved?
> >
> > Thanks,
> >
> > Alec
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
Re: TinyMCE & Twitter Bootstrap Toggle
Posted by Andrea Del Bene <an...@gmail.com>.
Hi,
you can have a look at InPlaceEditComponent which is used in the example
page InlineTinyMCEPage (see code at
https://github.com/wicketstuff/core/blob/master/jdk-1.6-parent/tinymce-parent/tinymce-examples/src/main/java/wicket/contrib/examples/tinymce/InlineTinyMCEPage.java)
> Hello,
>
> I have a bootstrap toggle button which the user can use to open and close
> TinyMCE editor. When the page is rendered I would like the TinyMCE editor
> to be closed and when user clicks on the toggle button - open.
>
> Note that twitter bootstrap button needs to know
> TinyMCE#getAjaxRegionMarkupId(area) in order to use it in
> toggle-target='xxx' attribute to toggle it.
>
> Is there a way to configure TinyMceBehavior to render hidden by default?
> Any other ideas on how I can get this solved?
>
> Thanks,
>
> Alec
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org