Package wicket.contrib.tinymce4.settings
Class TinyMCESettings
- java.lang.Object
-
- wicket.contrib.tinymce4.settings.TinyMCESettings
-
- All Implemented Interfaces:
Serializable
public class TinyMCESettings extends Object implements Serializable
Settings class for TinyMCE editor. User can add/remove buttons, enable/disable resizing, change positions, orientation, alignment and much more.- Author:
- Iulian-Corneliu Costan (iulian.costan@gmail.com), Frank Bille Jensen (fbille@avaleo.net)
- See Also:
Plugin,Button, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTinyMCESettings.LanguageLanguage enumstatic classTinyMCESettings.ModeThis class specifies how elements is to be converted into TinyMCE WYSIWYG editor instances.static classTinyMCESettings.ThemeThis class enables you to specify what theme to use when rendering the TinyMCE WYSIWYG editor instances.
-
Field Summary
Fields Modifier and Type Field Description static ResourceReferenceTINYMCE_JS_REFstatic ResourceReferenceTINYMCE_JS_REF_MIN
-
Constructor Summary
Constructors Constructor Description TinyMCESettings()TinyMCESettings(TinyMCESettings.Theme theme)TinyMCESettings(TinyMCESettings.Theme theme, TinyMCESettings.Language lang)
-
Method Summary
-
-
-
Field Detail
-
TINYMCE_JS_REF
public static final ResourceReference TINYMCE_JS_REF
-
TINYMCE_JS_REF_MIN
public static final ResourceReference TINYMCE_JS_REF_MIN
-
-
Constructor Detail
-
TinyMCESettings
public TinyMCESettings()
-
TinyMCESettings
public TinyMCESettings(TinyMCESettings.Theme theme)
-
TinyMCESettings
public TinyMCESettings(TinyMCESettings.Theme theme, TinyMCESettings.Language lang)
-
-
Method Detail
-
getTheme
public TinyMCESettings.Theme getTheme()
-
getLanguage
public TinyMCESettings.Language getLanguage()
-
getDocumentBaseUrl
public String getDocumentBaseUrl()
-
setDocumentBaseUrl
public TinyMCESettings setDocumentBaseUrl(String documentBaseUrl)
-
addCustomSetting
public TinyMCESettings addCustomSetting(String customSetting)
-
getCustomSettings
public String[] getCustomSettings()
-
getContentCss
public ResourceReference getContentCss()
-
setContentCss
public TinyMCESettings setContentCss(ResourceReference contentCss)
-
getBlockFormats
public String getBlockFormats()
-
setBlockFormats
public TinyMCESettings setBlockFormats(String blockFormats)
-
setReadOnly
public TinyMCESettings setReadOnly(boolean readOnly)
-
isReadOnly
public boolean isReadOnly()
-
setResizing
public TinyMCESettings setResizing(Boolean resizing)
-
getResizing
public Boolean getResizing()
-
setConvertUrls
public TinyMCESettings setConvertUrls(boolean convertUrls)
This option enables you to control if TinyMCE is to be clever and restore urls to their original values. URLs are auto converted/messed up by default since the built in browser logic works this way, there is no way to get the real URL unless you store it away. If you set this option to false it will try to keep these URLs intact. This option is set to true by default that means URLs will be forced absolute or relative depending on the state of relative_urls.- Parameters:
convertUrls-
-
getConvertUrls
public Boolean getConvertUrls()
-
setRemoveScriptHost
public TinyMCESettings setRemoveScriptHost(Boolean removeScriptHost)
If this option is enabled the protocol and host part of the URLs returned from the MCFileManager will be removed. This option is only used if the relative_urls option is set to false. This option is set to true by default. URL:s will be returned in this format: "/somedir/somefile.htm" instead of the default mode: "http://www.somesite.com/somedir/somefile.htm".- Parameters:
removeScriptHost-
-
getRemoveScriptHost
public Boolean getRemoveScriptHost()
-
setRelativeUrls
public TinyMCESettings setRelativeUrls(Boolean relativeUrls)
If this option is set to true, all URLs returned from the MCFileManager will be relative from the specified document_base_url. If it's set to false all URLs will be converted to absolute URLs. This option is set to true by default.- Parameters:
relativeUrls-
-
getRelativeUrls
public Boolean getRelativeUrls()
-
toJavaScript
public final String toJavaScript(TinyMCESettings.Mode mode, Collection<Component> components)
Generates the initialisation script. Internal API, do not call.
-
toJavaScript
public String toJavaScript()
-
addPlugins
public TinyMCESettings addPlugins(String pluginName)
-
addToolbar
public TinyMCESettings addToolbar(Toolbar toolbar)
-
getMenuBar
public Boolean getMenuBar()
-
setMenuBar
public TinyMCESettings setMenuBar(Boolean menuBar)
-
appendSingleConfigElement
public static void appendSingleConfigElement(StringBuffer buffer, String name, String value)
-
appendSingleConfigElement
public static void appendSingleConfigElement(StringBuffer buffer, String name, String value, boolean wrapValueWithQuotes)
-
getInLine
public Boolean getInLine()
-
setInLine
public TinyMCESettings setInLine(Boolean inLine)
-
-