public class TinyMceBehavior extends Behavior
| Constructor and Description |
|---|
TinyMceBehavior() |
TinyMceBehavior(TinyMCESettings settings) |
| Modifier and Type | Method and Description |
|---|---|
void |
bind(Component component) |
protected String |
getAddTinyMceSettingsScript(TinyMCESettings.Mode mode,
Collection<Component> components) |
protected Component |
getComponent() |
protected ResourceReference |
getTinyMCEReference()
TinyMCE javascript resource.
|
protected boolean |
isMarkupIdRequired() |
protected void |
lazyLoadTinyMCEResource(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(Component c,
IHeaderResponse response) |
protected HeaderItem |
wrapTinyMceSettingsScript(String settingScript,
Component component)
Wrap the initialization script for TinyMCE into a HeaderItem.
|
afterRender, beforeRender, canCallListener, detach, getStatelessHint, isEnabled, isTemporary, onAttribute, onComponentTag, onConfigure, onEvent, onException, onRemove, onTag, unbindpublic TinyMceBehavior()
public TinyMceBehavior(TinyMCESettings settings)
public void renderHead(Component c, IHeaderResponse response)
renderHead in interface IComponentAwareHeaderContributorrenderHead in class Behaviorprotected 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(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 HeaderItem wrapTinyMceSettingsScript(String settingScript, Component component)
settingScript - the actual initialization script for TinyMCEcomponent - the target component that must be decorated with TinyMCEprotected String getAddTinyMceSettingsScript(TinyMCESettings.Mode mode, Collection<Component> components)
protected boolean isMarkupIdRequired()
protected Component getComponent()
Copyright © 2004–2020. All rights reserved.