public class CKEditorConfig extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
CKEditorConfig.RESIZE_DIR |
Constructor and Description |
---|
CKEditorConfig() |
Modifier and Type | Method and Description |
---|---|
void |
addCustomToolbarLine(String toolbarLineJS)
If no custom toolbar is defined, it will use the Full toolbar by default (config.toolbar = 'Full').
|
void |
addExtraConfig(String extraConfigName,
String extraConfigValue)
Allows you to add any CKEDITOR.config option line to the in page configuration.
|
void |
addFontName(String newFontNameSpec) |
void |
addKeystrokeMapping(int keystroke,
String command) |
void |
addProtectedSource(String regex)
Add a protected source regular express to the list
Typical values are regular expressions like: /<%.*%>/g
If you don't start with a '/', a leading '/' and a trailing '/g' will be added automatically.
|
void |
addTemplatesFiles(String templateURL)
Add a new template url to the list of templates
|
void |
addToExtraPlugins(String pluginName) |
void |
addToRemovePlugins(String pluginName) |
void |
addWriterRules(String tagName,
String jsRule) |
protected StringBuilder |
appendJSONConfig(StringBuilder configBuf,
String oneOptions) |
void |
disableElementsPath() |
void |
disableResizeEditor() |
void |
disableSpellChecker() |
void |
enableCtrlSWithVaadinSavePlugin()
Enabled the vaadinsave plugin and sets the keystroke mapping for CTRL-S to trigger it.
|
void |
enableVaadinSavePlugin()
This enables the vaadinsave plugin.
|
List<String> |
getCkeditorDefaultFontNameList() |
List<String> |
getFontNameList() |
String |
getInPageConfig() |
String |
getKeystrokeCommandByKeystroke(Integer keystroke) |
Set<Integer> |
getKeystrokes() |
List<String> |
getProtectedSource() |
String |
getWriterIndentationChars() |
String |
getWriterRuleByTagName(String tagName) |
Set<String> |
getWriterRulesTagNames() |
boolean |
hasKeystrokeMappings() |
boolean |
hasProtectedSource() |
boolean |
hasWriterIndentationChars() |
boolean |
hasWriterRules() |
boolean |
isReadOnly() |
void |
setAllowedContent(String acfSpec) |
void |
setAllowedContentAll() |
void |
setBaseFloatZIndex(int zIndex) |
void |
setBodyClass(String bc)
Sets the body class for the HTML editor, so if you render the results in a body with a given class, you can give it here
too so that the editor will show the same styles you may have in your contents css.
|
void |
setContentsCss(String... cssFiles)
Sets the file or list of files for the contents to be applied to the editor.
|
void |
setDisableNativeSpellChecker(boolean v) |
void |
setEnterMode(int enterMode) |
void |
setEnterMode(String enterMode)
Sets 'enterMode' such that "P" will be 1, "BR" will be 2 and "DIV" will be 3.
|
void |
setExtraAllowedContent(String acfSpec) |
void |
setFilebrowserBrowseUrl(String url)
Sets the filebrowserBrowseUrl config option, which is an URL that will list files a user can select from
|
void |
setFilebrowserFlashBrowseLinkUrl(String url)
Sets the filebrowserFlashBrowseLinkUrl config option,
which is an URL that will allow for link browsing
in the Flash property dialog
|
void |
setFilebrowserFlashBrowseUrl(String url)
Sets the filebrowserFlashBrowseUrl config option, which is an URL that will allow browsing for Flash
|
void |
setFilebrowserFlashUploadUrl(String url)
Sets the filebrowserFlashUploadUrl config option, which is an URL that will allow a Flash file to be uploaded
|
void |
setFilebrowserImageBrowseLinkUrl(String url)
Sets the filebrowserImageBrowseLinkUrl config option,
which is an URL that will allow for link browsing
in the Image property dialog
|
void |
setFilebrowserImageBrowseUrl(String url)
Sets the filebrowserImageBrowseUrl config option, which is an URL that will list images a user can select from
|
void |
setFilebrowserImageUploadUrl(String url)
Sets the filebrowserImageUploadUrl config option, which is an URL that will allow an image file to be uploaded
|
void |
setFilebrowserImageWindowHeight(String size)
Sets the filebrowserImageWindowHeight config option, which is a height size spec (like "600" for 600 pixels); CKEditor defaults to 70%
|
void |
setFilebrowserImageWindowWidth(String size)
Sets the filebrowserImageWindowWidth config option, which is a width size spec (like "600" for 600 pixels); CKEditor defaults to 80%
|
void |
setFilebrowserLinkBrowseUrl(String url)
Sets the filebrowserLinkBrowseUrl config option, which is an URL that will allow for link browsing
|
void |
setFilebrowserUploadUrl(String url)
Sets the filebrowserUploadUrl config option, which is an URL that will allow a file to be uploaded
|
void |
setFilebrowserWindowHeight(String size)
Sets the filebrowserWindowHeight config option, which is a height size spec (like "600" for 600 pixels); CKEditor defaults to 70%
|
void |
setFilebrowserWindowWidth(String size)
Sets the filebrowserWindowWidth config option, which is a width size spec (like "600" for 600 pixels); CKEditor defaults to 80%
|
void |
setFontNames(List<String> fontNamesSpec) |
void |
setFontNames(String fontNamesSpec) |
void |
setForceEnterMode(Boolean forceEnterMode) |
void |
setForcePasteAsPlainText(Boolean forcePasteAsPlainText) |
void |
setFullPage(Boolean fullPage) |
void |
setHeight(String cssSize) |
void |
setInPageConfig(String js)
You can use this to just set the JavaScript/JSON notation for setting the 'in page config' option when the editor is
created.
|
void |
setLanguage(String language) |
void |
setPasteFromWordPromptCleanup(boolean v) |
void |
setPasteFromWordRemoveFontStyles(boolean v) |
void |
setReadOnly(boolean v) |
void |
setResizeDir(CKEditorConfig.RESIZE_DIR dir) |
void |
setResizeEnabled(boolean v) |
void |
setResizeMaxHeight(int pixels) |
void |
setResizeMaxWidth(int pixels) |
void |
setResizeMinHeight(int pixels) |
void |
setResizeMinWidth(int pixels) |
void |
setShiftEnterMode(int shiftEnterMode) |
void |
setShiftEnterMode(String shiftEnterMode)
Sets 'shiftEnterMode' such that "P" will be 1, "BR" will be 2 and "DIV" will be 3.
|
void |
setSkin(String newSkin)
Possible skins:
moono The default skin for CKEditor 4.x
kama The default skin for CKEditor 3.x
office2003
v2
|
void |
setStartupFocus(boolean v) |
void |
setStartupModeSource() |
void |
setStartupModeWysiwyg() |
void |
setStylesSet(String styleSetSpec)
Sets the stylesSet config option, which is the registered style name
|
void |
setTabSpaces(int numSpaces) |
void |
setTemplatesReplaceContent(Boolean templatesReplaceContent) |
void |
setToolbarCanCollapse(boolean v) |
void |
setToolbarStartupExpanded(Boolean newToolbarStartupExpanded) |
void |
setupForOpenESignForms(String contextPath,
String ckeditorContextIdInSession,
String bodyCssClass,
String... extraCssFiles)
Convenience method for the Open eSignForms project sponsors to set the plugins and configuration in a common way needed.
|
void |
setWidth(String cssSize) |
void |
setWriterIndentationChars(String v) |
void |
useCompactTags() |
protected String inPageConfig
protected LinkedList<String> extraConfigLines
protected String writerIndentationChars
protected LinkedList<String> extraPlugins
protected LinkedList<String> removePlugins
protected LinkedList<String> customToolbarLines
protected Boolean toolbarCanCollapse
protected Boolean disableNativeSpellChecker
protected Boolean resizeEnabled
protected String resizeDir
protected Integer resizeMinWidth
protected Integer resizeMaxWidth
protected Integer resizeMinHeight
protected Integer resizeMaxHeight
protected String width
protected String height
protected Integer baseFloatZIndex
protected Integer tabSpaces
protected Boolean pasteFromWordRemoveFontStyles
protected Boolean pasteFromWordPromptCleanup
protected String startupMode
protected Boolean startupFocus
protected Boolean readOnly
protected String[] contentsCssFiles
protected String fontNames
protected String stylesSet
protected String bodyClass
protected String skin
protected Boolean toolbarStartupExpanded
protected LinkedList<String> templates_files
protected Boolean templates_replaceContent
protected String allowedContent
protected String extraAllowedContent
protected String filebrowserBrowseUrl
protected String filebrowserUploadUrl
protected String filebrowserWindowWidth
protected String filebrowserWindowHeight
protected String filebrowserImageBrowseUrl
protected String filebrowserImageUploadUrl
protected String filebrowserImageWindowWidth
protected String filebrowserImageWindowHeight
protected String filebrowserImageBrowseLinkUrl
protected String filebrowserFlashBrowseUrl
protected String filebrowserFlashUploadUrl
protected String filebrowserFlashBrowseLinkUrl
protected String filebrowserLinkBrowseUrl
protected Integer enterMode
protected Integer shiftEnterMode
protected Boolean forceEnterMode
protected Boolean forcePasteAsPlainText
protected Boolean fullPage
protected String language
protected LinkedList<String> protectedSource
public static int CKEDITOR_KEYSTROKE_ALT
public static int CKEDITOR_KEYSTROKE_CTRL
public static int CKEDITOR_KEYSTROKE_SHIFT
public static final String CKEDITOR_DEFAULT_FONT_NAMES
public String getInPageConfig()
protected StringBuilder appendJSONConfig(StringBuilder configBuf, String oneOptions)
public void setInPageConfig(String js)
js
- the String JSON 'config' for the new editor instance.public void addExtraConfig(String extraConfigName, String extraConfigValue)
extraConfigName : extraConfigValue
extraConfigName
- the String CKEDITOR.config name to setextraConfigValue
- the String valuepublic boolean hasWriterRules()
public boolean hasKeystrokeMappings()
public void addKeystrokeMapping(int keystroke, String command)
public void enableCtrlSWithVaadinSavePlugin()
public void useCompactTags()
public String getWriterIndentationChars()
public boolean hasWriterIndentationChars()
public void setWriterIndentationChars(String v)
public void addToExtraPlugins(String pluginName)
public void enableVaadinSavePlugin()
enableCtrlSWithVaadinSavePlugin()
public void setupForOpenESignForms(String contextPath, String ckeditorContextIdInSession, String bodyCssClass, String... extraCssFiles)
public void addToRemovePlugins(String pluginName)
public void disableElementsPath()
public void disableResizeEditor()
public void disableSpellChecker()
public void setDisableNativeSpellChecker(boolean v)
public void addCustomToolbarLine(String toolbarLineJS)
toolbarLineJS
- public void setToolbarCanCollapse(boolean v)
public void setSkin(String newSkin)
newSkin
- the skin to setpublic void setToolbarStartupExpanded(Boolean newToolbarStartupExpanded)
newToolbarStartupExpanded
- the toolbarStartupExpanded statuspublic void setResizeEnabled(boolean v)
public void setResizeDir(CKEditorConfig.RESIZE_DIR dir)
public void setResizeMinWidth(int pixels)
public void setResizeMaxWidth(int pixels)
public void setResizeMinHeight(int pixels)
public void setResizeMaxHeight(int pixels)
public void setWidth(String cssSize)
public void setHeight(String cssSize)
public void setBaseFloatZIndex(int zIndex)
public void setTabSpaces(int numSpaces)
public void setPasteFromWordRemoveFontStyles(boolean v)
public void setPasteFromWordPromptCleanup(boolean v)
public void setStartupModeSource()
public void setStartupModeWysiwyg()
public void setStartupFocus(boolean v)
public boolean isReadOnly()
public void setReadOnly(boolean v)
public void setContentsCss(String... cssFiles)
cssFiles
- zero or more String file URL paths -- for same system, starting with context path is recommended: /myapp/path/to/cssfile.csspublic void setBodyClass(String bc)
bc
- public void addFontName(String newFontNameSpec)
public void setFontNames(String fontNamesSpec)
public void setStylesSet(String styleSetSpec)
styleSetSpec
- public void setFilebrowserBrowseUrl(String url)
url
- public void setFilebrowserUploadUrl(String url)
url
- public void setFilebrowserWindowWidth(String size)
url
- public void setFilebrowserWindowHeight(String size)
url
- public void setFilebrowserImageBrowseUrl(String url)
url
- public void setFilebrowserImageUploadUrl(String url)
url
- public void setFilebrowserImageWindowWidth(String size)
url
- public void setFilebrowserImageWindowHeight(String size)
url
- public void setFilebrowserFlashBrowseUrl(String url)
url
- public void setFilebrowserFlashUploadUrl(String url)
url
- public void setFilebrowserLinkBrowseUrl(String url)
url
- public void setFilebrowserFlashBrowseLinkUrl(String url)
url
- the filebrowserFlashBrowseLinkUrl to setpublic void setFilebrowserImageBrowseLinkUrl(String url)
url
- the filebrowserImageBrowseLinkUrl to setpublic void addTemplatesFiles(String templateURL)
templateURL
- public void setEnterMode(String enterMode)
enterMode
- string codeto just set by integer value
public void setEnterMode(int enterMode)
public void setShiftEnterMode(String shiftEnterMode)
shiftEnterMode
- string codeto just set by integer value
public void setShiftEnterMode(int shiftEnterMode)
public void setForceEnterMode(Boolean forceEnterMode)
public void setForcePasteAsPlainText(Boolean forcePasteAsPlainText)
public void setLanguage(String language)
public void setTemplatesReplaceContent(Boolean templatesReplaceContent)
public void setFullPage(Boolean fullPage)
public void addProtectedSource(String regex)
regex
- the String regular expression of the protected sourcepublic boolean hasProtectedSource()
public void setAllowedContent(String acfSpec)
public void setAllowedContentAll()
public void setExtraAllowedContent(String acfSpec)
Copyright © 2020 Magnolia International Ltd.. All rights reserved.