wicket.contrib.tinymce4.settings
Class TinyMCESettings

java.lang.Object
  extended by 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
static class TinyMCESettings.Language
          Language enum
static class TinyMCESettings.Mode
          This class specifies how elements is to be converted into TinyMCE WYSIWYG editor instances.
static class TinyMCESettings.Theme
          This class enables you to specify what theme to use when rendering the TinyMCE WYSIWYG editor instances.
 
Field Summary
static org.apache.wicket.request.resource.ResourceReference TINYMCE_JS_REF
           
static org.apache.wicket.request.resource.ResourceReference TINYMCE_JS_REF_MIN
           
 
Constructor Summary
TinyMCESettings()
           
TinyMCESettings(TinyMCESettings.Theme theme)
           
TinyMCESettings(TinyMCESettings.Theme theme, TinyMCESettings.Language lang)
           
 
Method Summary
 TinyMCESettings addCustomSetting(String customSetting)
           
 TinyMCESettings addPlugins(String pluginName)
           
 TinyMCESettings addToolbar(Toolbar toolbar)
           
static void appendSingleConfigElement(StringBuffer buffer, String name, String value)
           
static void appendSingleConfigElement(StringBuffer buffer, String name, String value, boolean wrapValueWithQuotes)
           
 String getBlockFormats()
           
 org.apache.wicket.request.resource.ResourceReference getContentCss()
           
 Boolean getConvertUrls()
           
 String[] getCustomSettings()
           
 String getDocumentBaseUrl()
           
 Boolean getInLine()
           
 TinyMCESettings.Language getLanguage()
           
 Boolean getMenuBar()
           
 Boolean getRelativeUrls()
           
 Boolean getRemoveScriptHost()
           
 Boolean getResizing()
           
 TinyMCESettings.Theme getTheme()
           
 boolean isReadOnly()
           
 TinyMCESettings setBlockFormats(String blockFormats)
           
 TinyMCESettings setContentCss(org.apache.wicket.request.resource.ResourceReference contentCss)
           
 TinyMCESettings setConvertUrls(boolean convertUrls)
          This option enables you to control if TinyMCE is to be clever and restore urls to their original values.
 TinyMCESettings setDocumentBaseUrl(String documentBaseUrl)
           
 TinyMCESettings setInLine(Boolean inLine)
           
 TinyMCESettings setMenuBar(Boolean menuBar)
           
 TinyMCESettings setReadOnly(boolean readOnly)
           
 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.
 TinyMCESettings setRemoveScriptHost(Boolean removeScriptHost)
          If this option is enabled the protocol and host part of the URLs returned from the MCFileManager will be removed.
 TinyMCESettings setResizing(Boolean resizing)
           
 String toJavaScript()
           
 String toJavaScript(TinyMCESettings.Mode mode, Collection<org.apache.wicket.Component> components)
          Generates the initialisation script.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TINYMCE_JS_REF

public static final org.apache.wicket.request.resource.ResourceReference TINYMCE_JS_REF

TINYMCE_JS_REF_MIN

public static final org.apache.wicket.request.resource.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 org.apache.wicket.request.resource.ResourceReference getContentCss()

setContentCss

public TinyMCESettings setContentCss(org.apache.wicket.request.resource.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<org.apache.wicket.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)


Copyright © 2004–2018. All rights reserved.