wicket.contrib.tinymce4
Class TinyMceBehavior
java.lang.Object
org.apache.wicket.behavior.Behavior
wicket.contrib.tinymce4.TinyMceBehavior
- All Implemented Interfaces:
- Serializable, org.apache.wicket.IComponentAwareEventSink, org.apache.wicket.markup.html.IComponentAwareHeaderContributor, org.apache.wicket.util.io.IClusterable
public class TinyMceBehavior
- extends org.apache.wicket.behavior.Behavior
Renders a component (textarea) as WYSIWYG editor, using TinyMce.
- See Also:
- Serialized Form
| Methods inherited from class org.apache.wicket.behavior.Behavior |
afterRender, beforeRender, canCallListenerInterface, detach, getStatelessHint, isEnabled, isTemporary, onComponentTag, onConfigure, onEvent, onException, onRemove, unbind |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TinyMceBehavior
public TinyMceBehavior()
TinyMceBehavior
public TinyMceBehavior(TinyMCESettings settings)
renderHead
public void renderHead(org.apache.wicket.Component component,
org.apache.wicket.markup.head.IHeaderResponse response)
- Specified by:
renderHead in interface org.apache.wicket.markup.html.IComponentAwareHeaderContributor- Overrides:
renderHead in class org.apache.wicket.behavior.Behavior
wrapTinyMceSettingsScript
protected org.apache.wicket.markup.head.HeaderItem wrapTinyMceSettingsScript(String settingScript,
org.apache.wicket.Component component)
- Wrap the initialization script for TinyMCE into a HeaderItem. In this way we can control
when and how the script should be executed.
- Parameters:
settingScript - the actual initialization script for TinyMCEcomponent - the target component that must be decorated with TinyMCE
- Returns:
- the HeaderItem containing
getAddTinyMceSettingsScript
protected String getAddTinyMceSettingsScript(TinyMCESettings.Mode mode,
Collection<org.apache.wicket.Component> components)
bind
public void bind(org.apache.wicket.Component component)
- Overrides:
bind in class org.apache.wicket.behavior.Behavior
isMarkupIdRequired
protected boolean isMarkupIdRequired()
getComponent
protected org.apache.wicket.Component getComponent()
getTinyMCEReference
protected org.apache.wicket.request.resource.ResourceReference getTinyMCEReference()
TinyMCE javascript resource.
Note: The TinyMCE source cannot be lazily loaded via ajax. Therefore, adding
this in a IHeaderContributor.renderHead(IHeaderResponse) must be done in a component
that is not rendered via Ajax. If you wish to load this via Ajax, you can use the very hacky
workaround #lazyLoadTinyMCEResource(IHeaderResponse).
- Returns:
Copyright © 2004–2018. All rights reserved.