public class HCTinyMCE4 extends Object implements com.helger.html.hc.IHCNodeBuilder
setSelector(String) but this does not need to be called, as the
default value DEFAULT_SELECTOR is used automatically.addCustomOption(String, IJSExpression)| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_BROWSER_SPELLCHECK |
static boolean |
DEFAULT_CONVERT_FONTS_TO_SPANS |
static boolean |
DEFAULT_HIDDEN_INPUT |
static boolean |
DEFAULT_INLINE |
static boolean |
DEFAULT_MENUBAR_DISABLED |
static boolean |
DEFAULT_NOWRAP |
static boolean |
DEFAULT_OBJECT_RESIZING |
static boolean |
DEFAULT_PREVIEW_STYLES |
static String |
DEFAULT_SELECTOR |
static boolean |
DEFAULT_STATUSBAR |
static boolean |
DEFAULT_TOOLBAR_DISABLED |
| Constructor and Description |
|---|
HCTinyMCE4() |
| Modifier and Type | Method and Description |
|---|---|
HCTinyMCE4 |
addAllPlugins()
Add all available plugins there are.
|
HCTinyMCE4 |
addCustomOption(String sName,
BigDecimal aValue) |
HCTinyMCE4 |
addCustomOption(String sName,
boolean bValue) |
HCTinyMCE4 |
addCustomOption(String sName,
double dValue) |
HCTinyMCE4 |
addCustomOption(String sName,
com.helger.html.js.builder.IJSExpression aValue) |
HCTinyMCE4 |
addCustomOption(String sName,
int nValue) |
HCTinyMCE4 |
addCustomOption(String sName,
String sValue) |
HCTinyMCE4 |
addExternalPlugin(TinyMCE4ExternalPlugin aExternalPlugin)
Add an external plugin to the editor.
|
HCTinyMCE4 |
addExternalPlugins(Iterable<? extends TinyMCE4ExternalPlugin> aExternalPlugins)
Add multiple external plugins at once.
|
HCTinyMCE4 |
addExternalPlugins(TinyMCE4ExternalPlugin... aExternalPlugins)
Add multiple external plugins at once.
|
HCTinyMCE4 |
addPlugin(ETinyMCE4Plugin ePlugin)
Add a TinyMCE plugin to use.
|
HCTinyMCE4 |
addPlugins(ETinyMCE4Plugin... aPlugins)
Add multiple TinyMCE plugins at once.
|
HCTinyMCE4 |
addPlugins(Iterable<ETinyMCE4Plugin> aPlugins)
Add multiple TinyMCE plugins at once.
|
com.helger.html.hc.html.HCScript |
build() |
boolean |
containsCustomOption(String sName) |
Map<String,com.helger.html.js.builder.IJSExpression> |
getAllCustomOptions() |
Set<TinyMCE4ExternalPlugin> |
getAllExternalPlugins() |
Set<ETinyMCE4Plugin> |
getAllPlugins() |
String |
getAutoFocus() |
int |
getCustomOptionCount() |
com.helger.html.js.builder.IJSExpression |
getCustomOptionValue(String sName) |
com.helger.html.hc.api.EHCTextDirection |
getDirectionality() |
int |
getExternalPluginCount() |
com.helger.html.js.builder.JSAnonymousFunction |
getFileBrowserCallback() |
int |
getHeight() |
com.helger.html.js.builder.JSAssocArray |
getJSInitOptions() |
com.helger.html.js.builder.JSInvocation |
getJSInvocation() |
ETinyMCE4Language |
getLanguage() |
com.helger.commons.url.ISimpleURL |
getLanguageURL() |
TinyMCE4MenubarItemList |
getMenubar() |
int |
getPluginCount() |
ETinyMCE4Resize |
getResize() |
String |
getSelector() |
ETinyMCE4Skin |
getSkin() |
com.helger.commons.url.ISimpleURL |
getSkinURL() |
ETinyMCE4Theme |
getTheme() |
com.helger.commons.url.ISimpleURL |
getThemeURL() |
TinyMCE4ToolbarControlList |
getToolbar() |
int |
getWidth() |
boolean |
isBrowserSpellcheck() |
boolean |
isConvertFontsToSpans() |
boolean |
isHiddenInput() |
boolean |
isInline() |
boolean |
isMenubarDisabled() |
boolean |
isNoWrap() |
boolean |
isObjectResizing() |
boolean |
isPreviewStyles() |
boolean |
isStatusbar() |
boolean |
isToolbarDisabled() |
static void |
registerExternalResources() |
com.helger.html.js.builder.IJSExpression |
removeCustomOption(String sName) |
com.helger.commons.state.EChange |
removeExternalPlugin(TinyMCE4ExternalPlugin aExternalPlugin)
Remove the specified external plugin.
|
com.helger.commons.state.EChange |
removeExternalPlugins(Iterable<? extends TinyMCE4ExternalPlugin> aExternalPlugins)
Remove the specified external plugins.
|
com.helger.commons.state.EChange |
removeExternalPlugins(TinyMCE4ExternalPlugin... aExternalPlugins)
Remove the specified external plugins.
|
com.helger.commons.state.EChange |
removePlugin(ETinyMCE4Plugin ePlugin)
Remove the specified plugin.
|
com.helger.commons.state.EChange |
removePlugins(ETinyMCE4Plugin... aPlugins)
Remove the specified TinyMCE plugins.
|
com.helger.commons.state.EChange |
removePlugins(Iterable<ETinyMCE4Plugin> aPlugins)
Remove the specified TinyMCE plugins.
|
HCTinyMCE4 |
setAutoFocus(String sAutoFocus)
This option enables you to auto focus an editor instance.
|
HCTinyMCE4 |
setBrowserSpellcheck(boolean bBrowserSpellcheck)
This is a true/false value if the usage of the browsers internal
spellchecker should be used.
|
HCTinyMCE4 |
setBrowserSpellcheck(Boolean aBrowserSpellcheck)
This is a true/false value if the usage of the browsers internal
spellchecker should be used.
|
HCTinyMCE4 |
setConvertFontsToSpans(boolean bConvertFontsToSpans)
If you set this option to true, TinyMCE will convert all font elements to
span elements and generate span elements instead of font elements.
|
HCTinyMCE4 |
setConvertFontsToSpans(Boolean aConvertFontsToSpans)
If you set this option to true, TinyMCE will convert all font elements to
span elements and generate span elements instead of font elements.
|
HCTinyMCE4 |
setDirectionality(com.helger.html.hc.api.EHCTextDirection eDirectionality)
Set the default directionality of the editor.
|
HCTinyMCE4 |
setFileBrowserCallback(com.helger.html.js.builder.JSAnonymousFunction aFileBrowserCallback)
This option enables you to add your own file browser/image browser to
TinyMCE.
|
HCTinyMCE4 |
setHeight(int nHeight)
Set the height of the editor.
|
HCTinyMCE4 |
setHiddenInput(boolean bHiddenInput)
This option gives you the ability to disable the auto generation of hidden
input fields for inline editing elements.
|
HCTinyMCE4 |
setHiddenInput(Boolean aHiddenInput)
This option gives you the ability to disable the auto generation of hidden
input fields for inline editing elements.
|
HCTinyMCE4 |
setInline(boolean bInline)
This option changes the behaviour of the editor to allow the usage of
inline elements instead of a textarea.
|
HCTinyMCE4 |
setInline(Boolean aInline)
This option changes the behaviour of the editor to allow the usage of
inline elements instead of a textarea.
|
HCTinyMCE4 |
setLanguage(ETinyMCE4Language eLanguage)
Set the language of the UI texts
|
HCTinyMCE4 |
setLanguageURL(com.helger.commons.url.ISimpleURL aLanguageURL)
A simple URL to where the language file to use.
|
HCTinyMCE4 |
setMenubar(TinyMCE4MenubarItemList aMenubar)
This option allows you to configure the menus you want to appear in the
menu bar.
|
HCTinyMCE4 |
setMenubarDisabled(boolean bMenubarDisabled)
Manually enable or disable the toolbar.
|
HCTinyMCE4 |
setNoWrap(boolean bNoWrap)
This option will make the editable are behave like very much like a
<pre> tag, and add a scroll instead of wrapping text.
|
HCTinyMCE4 |
setNoWrap(Boolean aNoWrap)
This option will make the editable are behave like very much like a
<pre> tag, and add a scroll instead of wrapping text.
|
HCTinyMCE4 |
setObjectResizing(boolean bObjectResizing)
This options allows you to turn on/off the resizing handles on images,
tables or media objects.
|
HCTinyMCE4 |
setObjectResizing(Boolean aObjectResizing)
This options allows you to turn on/off the resizing handles on images,
tables or media objects.
|
HCTinyMCE4 |
setPreviewStyles(boolean bPreviewStyles)
The enables you to turn of the preview of styles in format/style listboxes.
|
HCTinyMCE4 |
setPreviewStyles(Boolean aPreviewStyles)
The enables you to turn of the preview of styles in format/style listboxes.
|
HCTinyMCE4 |
setResize(ETinyMCE4Resize eResize) |
HCTinyMCE4 |
setSelector(String sSelector)
Selector option, allows you to use CSS selector syntax for determining what areas should be editable, this is the recommended way of selecting what elements should be editable.
|
HCTinyMCE4 |
setSkin(ETinyMCE4Skin eSkin)
Select what skin to use, this should match the foldername of the skin.
|
HCTinyMCE4 |
setSkinURL(com.helger.commons.url.ISimpleURL aSkinURL)
This option enables you to specify location of the current skin.
|
HCTinyMCE4 |
setStatusbar(boolean bStatusbar)
Show or hide the statusbar.
|
HCTinyMCE4 |
setStatusbar(Boolean aStatusbar)
Show or hide the statusbar.
|
HCTinyMCE4 |
setTheme(ETinyMCE4Theme eTheme)
Set the theme of TinyMCE.
|
HCTinyMCE4 |
setThemeURL(com.helger.commons.url.ISimpleURL aThemeURL)
This option enables you to specify location of the current theme.
|
HCTinyMCE4 |
setToolbar(TinyMCE4ToolbarControlList aToolbar)
This controls what buttons you want show up in the toolbar.
|
HCTinyMCE4 |
setToolbarDisabled(boolean bToolbarDisabled)
Manually enable or disable the toolbar.
|
HCTinyMCE4 |
setWidth(int nWidth)
Set the width of the editor.
|
public static final boolean DEFAULT_BROWSER_SPELLCHECK
public static final boolean DEFAULT_NOWRAP
public static final boolean DEFAULT_OBJECT_RESIZING
public static final String DEFAULT_SELECTOR
public static final boolean DEFAULT_INLINE
public static final boolean DEFAULT_HIDDEN_INPUT
public static final boolean DEFAULT_CONVERT_FONTS_TO_SPANS
public static final boolean DEFAULT_TOOLBAR_DISABLED
public static final boolean DEFAULT_MENUBAR_DISABLED
public static final boolean DEFAULT_STATUSBAR
public static final boolean DEFAULT_PREVIEW_STYLES
@Nonnull public HCTinyMCE4 setAutoFocus(@Nullable String sAutoFocus)
sAutoFocus - Editor ID@Nullable public com.helger.html.hc.api.EHCTextDirection getDirectionality()
@Nonnull public HCTinyMCE4 setDirectionality(@Nullable com.helger.html.hc.api.EHCTextDirection eDirectionality)
Set the default directionality of the editor. Possible values are: - ltr - rtl
eDirectionality - directionpublic boolean isBrowserSpellcheck()
@Nonnull public HCTinyMCE4 setBrowserSpellcheck(boolean bBrowserSpellcheck)
bBrowserSpellcheck - true to enabled, false to disable@Nonnull public HCTinyMCE4 setBrowserSpellcheck(@Nullable Boolean aBrowserSpellcheck)
aBrowserSpellcheck - true to enabled, false to disable and
null for default value.@Nullable public ETinyMCE4Language getLanguage()
@Nonnull public HCTinyMCE4 setLanguage(@Nullable ETinyMCE4Language eLanguage)
eLanguage - The language to use. null means English@Nullable public com.helger.commons.url.ISimpleURL getLanguageURL()
@Nonnull public HCTinyMCE4 setLanguageURL(@Nullable com.helger.commons.url.ISimpleURL aLanguageURL)
aLanguageURL - The language URL to use.public boolean isNoWrap()
@Nonnull public HCTinyMCE4 setNoWrap(boolean bNoWrap)
bNoWrap - true to enabled, false to disable@Nonnull public HCTinyMCE4 setNoWrap(@Nullable Boolean aNoWrap)
aNoWrap - true to enabled, false to disable and
null for default value.public boolean isObjectResizing()
@Nonnull public HCTinyMCE4 setObjectResizing(boolean bObjectResizing)
bObjectResizing - true to enabled, false to disable@Nonnull public HCTinyMCE4 setObjectResizing(@Nullable Boolean aObjectResizing)
aObjectResizing - true to enabled, false to disable and
null for default value.@Nonnull @ReturnsMutableCopy public Set<ETinyMCE4Plugin> getAllPlugins()
@Nonnegative public int getPluginCount()
@Nonnull public HCTinyMCE4 addPlugin(@Nonnull ETinyMCE4Plugin ePlugin)
ePlugin - The plugin to add. May not be null.@Nonnull public HCTinyMCE4 addPlugins(@Nullable ETinyMCE4Plugin... aPlugins)
aPlugins - The plugins to add. The array may be null but the
contained elements may not be null.@Nonnull public HCTinyMCE4 addPlugins(@Nullable Iterable<ETinyMCE4Plugin> aPlugins)
aPlugins - The plugins to add. The array may be null but the
contained elements may not be null.@Nonnull public HCTinyMCE4 addAllPlugins()
@Nonnull public com.helger.commons.state.EChange removePlugin(@Nullable ETinyMCE4Plugin ePlugin)
ePlugin - The plugin to be removed. May be null.EChange.CHANGED if the plugin was successfully removed.@Nonnull public com.helger.commons.state.EChange removePlugins(@Nullable ETinyMCE4Plugin... aPlugins)
aPlugins - The plugins to be removed. May be null.EChange.CHANGED it at least one plugin was removed
successfully.@Nonnull public com.helger.commons.state.EChange removePlugins(@Nullable Iterable<ETinyMCE4Plugin> aPlugins)
aPlugins - The plugins to be removed. May be null.EChange.CHANGED it at least one plugin was removed
successfully.@Nonnull @ReturnsMutableCopy public Set<TinyMCE4ExternalPlugin> getAllExternalPlugins()
@Nonnegative public int getExternalPluginCount()
@Nonnull public HCTinyMCE4 addExternalPlugin(@Nonnull TinyMCE4ExternalPlugin aExternalPlugin)
aExternalPlugin - The plugin to be added. May not be null.@Nonnull public HCTinyMCE4 addExternalPlugins(@Nullable TinyMCE4ExternalPlugin... aExternalPlugins)
aExternalPlugins - The plugins to be added. May be null but no contained
plugin may be null.@Nonnull public HCTinyMCE4 addExternalPlugins(@Nullable Iterable<? extends TinyMCE4ExternalPlugin> aExternalPlugins)
aExternalPlugins - The plugins to be added. May be null but no contained
plugin may be null.@Nonnull public com.helger.commons.state.EChange removeExternalPlugin(@Nullable TinyMCE4ExternalPlugin aExternalPlugin)
aExternalPlugin - The plugin to be removed. May be null.EChange.CHANGED if the plugin was removed successfully.@Nonnull public com.helger.commons.state.EChange removeExternalPlugins(@Nullable TinyMCE4ExternalPlugin... aExternalPlugins)
aExternalPlugins - The plugins to be removed. May be null.EChange.CHANGED it at least one plugin was removed
successfully.@Nonnull public com.helger.commons.state.EChange removeExternalPlugins(@Nullable Iterable<? extends TinyMCE4ExternalPlugin> aExternalPlugins)
aExternalPlugins - The plugins to be removed. May be null.EChange.CHANGED it at least one plugin was removed
successfully.@Nonnull @Nonempty public String getSelector()
@Nonnull public HCTinyMCE4 setSelector(@Nonnull@Nonempty String sSelector)
Selector option, allows you to use CSS selector syntax for determining what areas should be editable, this is the recommended way of selecting what elements should be editable. Some examples of usage. This would select all textarea elements in the page. selector: "textarea", This would select all textareas with the class .editme in your page. selector: "textarea.editme", If you use the inline option, the selector can be used on any block element. selector: "h1.editme", selector: "div.editme",
sSelector - The selector to use. May neither be null nor empty.@Nullable public ETinyMCE4Skin getSkin()
@Nonnull public HCTinyMCE4 setSkin(@Nullable ETinyMCE4Skin eSkin)
eSkin - Skin to use. May be null.@Nullable public com.helger.commons.url.ISimpleURL getSkinURL()
@Nonnull public HCTinyMCE4 setSkinURL(@Nullable com.helger.commons.url.ISimpleURL aSkinURL)
aSkinURL - The skin URL to use.@Nullable public ETinyMCE4Theme getTheme()
@Nonnull public HCTinyMCE4 setTheme(@Nullable ETinyMCE4Theme eTheme)
eTheme - Theme to use.@Nullable public com.helger.commons.url.ISimpleURL getThemeURL()
@Nonnull public HCTinyMCE4 setThemeURL(@Nullable com.helger.commons.url.ISimpleURL aThemeURL)
aThemeURL - The theme URL to use.public boolean isInline()
@Nonnull public HCTinyMCE4 setInline(boolean bInline)
bInline - true to enabled, false to disable@Nonnull public HCTinyMCE4 setInline(@Nullable Boolean aInline)
aInline - true to enabled, false to disable and
null for default value.public boolean isHiddenInput()
@Nonnull public HCTinyMCE4 setHiddenInput(boolean bHiddenInput)
bHiddenInput - true to enabled, false to disable@Nonnull public HCTinyMCE4 setHiddenInput(@Nullable Boolean aHiddenInput)
aHiddenInput - true to enabled, false to disable and
null for default value.public boolean isConvertFontsToSpans()
@Nonnull public HCTinyMCE4 setConvertFontsToSpans(boolean bConvertFontsToSpans)
bConvertFontsToSpans - true to enabled, false to disable@Nonnull public HCTinyMCE4 setConvertFontsToSpans(@Nullable Boolean aConvertFontsToSpans)
aConvertFontsToSpans - true to enabled, false to disable and
null for default value.@Nullable @ReturnsMutableObject(reason="Design") public TinyMCE4ToolbarControlList getToolbar()
@Nonnull public HCTinyMCE4 setToolbar(@Nullable TinyMCE4ToolbarControlList aToolbar)
aToolbar - The toolbar to be set. May be null. If not
null a clone of the object is stored.public boolean isToolbarDisabled()
@Nonnull public HCTinyMCE4 setToolbarDisabled(boolean bToolbarDisabled)
bToolbarDisabled - true to disable it@Nullable @ReturnsMutableObject(reason="Design") public TinyMCE4MenubarItemList getMenubar()
@Nonnull public HCTinyMCE4 setMenubar(@Nullable TinyMCE4MenubarItemList aMenubar)
aMenubar - The menu bar to be set. May be null. If not
null a clone of the object is stored.public boolean isMenubarDisabled()
@Nonnull public HCTinyMCE4 setMenubarDisabled(boolean bMenubarDisabled)
bMenubarDisabled - true to disable itpublic boolean isStatusbar()
@Nonnull public HCTinyMCE4 setStatusbar(boolean bStatusbar)
bStatusbar - true to show, false to hide@Nonnull public HCTinyMCE4 setStatusbar(@Nullable Boolean aStatusbar)
aStatusbar - true to show, false to hide and
null for default value.@Nullable public ETinyMCE4Resize getResize()
@Nonnull public HCTinyMCE4 setResize(@Nullable ETinyMCE4Resize eResize)
public int getWidth()
@Nonnull public HCTinyMCE4 setWidth(int nWidth)
nWidth - New width. Only values >= 0 are considered!public int getHeight()
@Nonnull public HCTinyMCE4 setHeight(int nHeight)
nHeight - New height. Only values >= 0 are considered!public boolean isPreviewStyles()
@Nonnull public HCTinyMCE4 setPreviewStyles(boolean bPreviewStyles)
bPreviewStyles - true to show, false to hide@Nonnull public HCTinyMCE4 setPreviewStyles(@Nullable Boolean aPreviewStyles)
aPreviewStyles - true to show, false to hide and
null for default value.@Nullable public com.helger.html.js.builder.JSAnonymousFunction getFileBrowserCallback()
@Nonnull public HCTinyMCE4 setFileBrowserCallback(@Nullable com.helger.html.js.builder.JSAnonymousFunction aFileBrowserCallback)
aFileBrowserCallback - Callback function@Nonnull public HCTinyMCE4 addCustomOption(@Nonnull@Nonempty String sName, boolean bValue)
@Nonnull public HCTinyMCE4 addCustomOption(@Nonnull@Nonempty String sName, int nValue)
@Nonnull public HCTinyMCE4 addCustomOption(@Nonnull@Nonempty String sName, double dValue)
@Nonnull public HCTinyMCE4 addCustomOption(@Nonnull@Nonempty String sName, @Nonnull BigDecimal aValue)
@Nonnull public HCTinyMCE4 addCustomOption(@Nonnull@Nonempty String sName, @Nonnull String sValue)
@Nonnull public HCTinyMCE4 addCustomOption(@Nonnull@Nonempty String sName, @Nonnull com.helger.html.js.builder.IJSExpression aValue)
@Nullable public com.helger.html.js.builder.IJSExpression removeCustomOption(@Nullable String sName)
@Nonnull @ReturnsMutableCopy public Map<String,com.helger.html.js.builder.IJSExpression> getAllCustomOptions()
@Nullable public com.helger.html.js.builder.IJSExpression getCustomOptionValue(@Nullable String sName)
@Nonnegative public int getCustomOptionCount()
@Nonnull @ReturnsMutableCopy public com.helger.html.js.builder.JSAssocArray getJSInitOptions()
@Nonnull public com.helger.html.js.builder.JSInvocation getJSInvocation()
@Nonnull public com.helger.html.hc.html.HCScript build()
build in interface com.helger.html.hc.IHCNodeBuilderpublic static void registerExternalResources()
Copyright © 2014–2015 Philip Helger. All rights reserved.