public class TinyMceBehavior
extends org.apache.wicket.behavior.Behavior
Constructor and Description |
---|
TinyMceBehavior() |
TinyMceBehavior(TinyMCESettings settings) |
Modifier and Type | Method and Description |
---|---|
void |
bind(org.apache.wicket.Component component) |
protected String |
getAddTinyMceSettingsScript(TinyMCESettings.Mode mode,
Collection<org.apache.wicket.Component> components) |
protected org.apache.wicket.Component |
getComponent() |
protected org.apache.wicket.request.resource.ResourceReference |
getTinyMCEReference()
TinyMCE javascript resource.
|
protected boolean |
isMarkupIdRequired() |
protected void |
lazyLoadTinyMCEResource(org.apache.wicket.markup.head.IHeaderResponse response)
Normally, TinyMCE cannot be natively loaded lazily; you must have the 'tiny_mce.js' script
rendered directly to your page instead of through an Ajax loaded component.
|
void |
renderHead(org.apache.wicket.Component c,
org.apache.wicket.markup.head.IHeaderResponse response) |
protected org.apache.wicket.markup.head.HeaderItem |
wrapTinyMceSettingsScript(String settingScript,
org.apache.wicket.Component component)
Wrap the initialization script for TinyMCE into a HeaderItem.
|
public TinyMceBehavior()
public TinyMceBehavior(TinyMCESettings settings)
public void renderHead(org.apache.wicket.Component c, org.apache.wicket.markup.head.IHeaderResponse response)
renderHead
in interface org.apache.wicket.markup.html.IComponentAwareHeaderContributor
renderHead
in class org.apache.wicket.behavior.Behavior
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)
.
protected final void lazyLoadTinyMCEResource(org.apache.wicket.markup.head.IHeaderResponse response)
Normally, TinyMCE cannot be natively loaded lazily; you must have the 'tiny_mce.js' script rendered directly to your page instead of through an Ajax loaded component. This method provides a workaround similar to the one described on:
http://tinymce.moxiecode.com/forum/viewtopic.php?pid=66531#p66531
response
- protected org.apache.wicket.markup.head.HeaderItem wrapTinyMceSettingsScript(String settingScript, org.apache.wicket.Component component)
settingScript
- the actual initialization script for TinyMCEcomponent
- the target component that must be decorated with TinyMCEprotected String getAddTinyMceSettingsScript(TinyMCESettings.Mode mode, Collection<org.apache.wicket.Component> components)
public void bind(org.apache.wicket.Component component)
bind
in class org.apache.wicket.behavior.Behavior
protected boolean isMarkupIdRequired()
protected org.apache.wicket.Component getComponent()
Copyright © 2015. All rights reserved.