You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by dylanbozeman <dy...@boeing.com> on 2018/12/14 22:24:27 UTC

Using WicketStuff TinyMceBehavior

I am attempting to use WicketStuff's TinyMceBehavior to add richtext
capabilities to a textbox.

I added the WicketStuff dependencies (including the one for TinyMce)

However, when I do the following (as WicketStuff's documentation says to)

        final TextArea<String> showArticleContent = new
TextArea<>("showArticleContent",
            new PropertyModel<String>(this, "articleContent"));
        tinyMceBehavior = new TinyMceBehavior();
        showArticleContent.add(tinyMceBehavior);

I am getting this error: The method add(IValidator<? super String>) in the
type FormComponent<String> is not applicable for the arguments
(TinyMceBehavior)

Here's a page that demonstrates it:
https://mysticcoders.com/blog/wicket-tinymce-some-advanced-tips

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Using WicketStuff TinyMceBehavior

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Most probably you have mixed versions of Wicket and WicketStuff-TinyMCE in
your project.
https://github.com/wicketstuff/core/blob/c1ccc4ae54e536db664233e884106e06a76cf813/tinymce4-parent/tinymce4/src/main/java/wicket/contrib/tinymce4/TinyMceBehavior.java#L41
- public class TinyMceBehavior extends Behavior
i.e. a Component should be able to add a Behavior

On Sat, Dec 15, 2018 at 12:24 AM dylanbozeman <dy...@boeing.com>
wrote:

> I am attempting to use WicketStuff's TinyMceBehavior to add richtext
> capabilities to a textbox.
>
> I added the WicketStuff dependencies (including the one for TinyMce)
>
> However, when I do the following (as WicketStuff's documentation says to)
>
>         final TextArea<String> showArticleContent = new
> TextArea<>("showArticleContent",
>             new PropertyModel<String>(this, "articleContent"));
>         tinyMceBehavior = new TinyMceBehavior();
>         showArticleContent.add(tinyMceBehavior);
>
> I am getting this error: The method add(IValidator<? super String>) in the
> type FormComponent<String> is not applicable for the arguments
> (TinyMceBehavior)
>
> Here's a page that demonstrates it:
> https://mysticcoders.com/blog/wicket-tinymce-some-advanced-tips
>
> --
> Sent from:
> http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>