info.magnolia.module.fckeditor.dialogs
Class FckEditorDialog
java.lang.Object
info.magnolia.cms.gui.dialog.DialogControlImpl
info.magnolia.cms.gui.dialog.DialogBox
info.magnolia.module.fckeditor.dialogs.FckEditorDialog
- All Implemented Interfaces:
- DialogControl
public class FckEditorDialog
- extends DialogBox
An Magnolia dialog for the universal usage and configuration of the fckeditor. Credits for FCKEditor:
http://www.fckeditor.net/
The fckEditor is mainly configured in javascript files. Those files are configured
with the following attributes.
- jsInitFile
- customConfigurationPath
Where the default values are:
- /admindocroot/fckeditor/custom/init/magnoliaStandard.js
- /admindocroot/fckeditor/custom/config/magnoliaStandard.js
To make live simple we provide some attributes to configure the control in the magnolia configuration instead within
the javascript files.
css |
The css file to use. Default is /admindocroot/fckeditor/custom/css/magnoliaStandard.css |
height |
The height of the editor. |
width |
The width of the editor. |
tables |
The table editing features are available if true |
lists |
The list features are available if true |
aligment |
The aligment features are available if true |
images |
The image editing features including upload are available if true |
fileUpload |
The file upload features is enabled if true |
styles |
Defines the xml file defining the used styles. See
http://wiki.fckeditor.net/Developer%27s_Guide/Configuration/Styles for details |
templates |
Defines the xml file defining the used templates. See
http://wiki.fckeditor.net/Developer%27s_Guide/Configuration/Templates for details |
fonts |
A semicolon separated list of font names. |
fontSizes |
A semicolon separated list of font sizes |
colors |
A comma separated list of colors. hex values without #. |
source |
Show the source button |
- Version:
- $Id: FckEditorDialog.java 32667 2010-03-13 00:37:06Z gjoseph $
- Author:
- bert schulzki, Fabrizio Giustina
Constructor Summary |
FckEditorDialog()
Empty constructor should only be used by DialogFactory. |
Method Summary |
java.lang.String |
convertToView(java.lang.String value)
|
void |
drawHtml(java.io.Writer out)
|
java.lang.String |
escapeJsValue(java.lang.String src)
Escapes the given String to make it javascript friendly. |
java.lang.String |
getVarName()
|
void |
init(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Content websiteNode,
Content configNode)
|
Methods inherited from class info.magnolia.cms.gui.dialog.DialogControlImpl |
addOption, addSub, clearWebsiteNode, drawHtmlPostSubs, drawHtmlPreSubs, drawSubs, getConfigValue, getConfigValue, getDescription, getId, getLabel, getMessage, getMessage, getMessages, getName, getOptions, getParent, getRequest, getResponse, getStorageNode, getSub, getSubs, getTopParent, getValidationPattern, getValue, getValues, getWebsiteNode, isRequired, readValue, readValues, removeSessionAttribute, setConfig, setConfig, setConfig, setDescription, setLabel, setName, setOptions, setRequired, setSaveInfo, setSessionAttribute, setTopParent, setValidationMessage, setValue, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FCKEDIT_PATH
public static final java.lang.String FCKEDIT_PATH
- The new .BasePath of the editor
- See Also:
- Constant Field Values
PARAM_JS_INIT_FILE
public static final java.lang.String PARAM_JS_INIT_FILE
- This parameter defines the startup script. This parameter is searched in the dialog configuration.
- See Also:
- Constant Field Values
PARAM_CUSTOM_CONFIGURATION_PATH
public static final java.lang.String PARAM_CUSTOM_CONFIGURATION_PATH
- This parameter defines the configuration script
- See Also:
- Constant Field Values
PARAM_CSS
public static final java.lang.String PARAM_CSS
- See Also:
- Constant Field Values
PARAM_HEIGHT
public static final java.lang.String PARAM_HEIGHT
- See Also:
- Constant Field Values
PARAM_WIDTH
public static final java.lang.String PARAM_WIDTH
- See Also:
- Constant Field Values
PARAM_TABLES
public static final java.lang.String PARAM_TABLES
- See Also:
- Constant Field Values
PARAM_IMAGES
public static final java.lang.String PARAM_IMAGES
- See Also:
- Constant Field Values
PARAM_STYLES
public static final java.lang.String PARAM_STYLES
- See Also:
- Constant Field Values
PARAM_TEMPLATES
public static final java.lang.String PARAM_TEMPLATES
- See Also:
- Constant Field Values
PARAM_FONTS
public static final java.lang.String PARAM_FONTS
- See Also:
- Constant Field Values
PARAM_FONT_SIZES
public static final java.lang.String PARAM_FONT_SIZES
- See Also:
- Constant Field Values
PARAM_SOURCE
public static final java.lang.String PARAM_SOURCE
- See Also:
- Constant Field Values
PARAM_JS_INIT_FILE_DEFAULT
public static final java.lang.String PARAM_JS_INIT_FILE_DEFAULT
- Default values
- See Also:
- Constant Field Values
PARAM_CUSTOM_CONFIGURATION_PATH_DEFAULT
public static final java.lang.String PARAM_CUSTOM_CONFIGURATION_PATH_DEFAULT
- See Also:
- Constant Field Values
PARAM_CSS_DEFAULT
public static final java.lang.String PARAM_CSS_DEFAULT
- See Also:
- Constant Field Values
PARAM_HEIGHT_DEFAULT
public static final java.lang.String PARAM_HEIGHT_DEFAULT
- See Also:
- Constant Field Values
PARAM_WIDTH_DEFAULT
public static final java.lang.String PARAM_WIDTH_DEFAULT
- See Also:
- Constant Field Values
PARAM_TABLES_DEFAULT
public static final java.lang.String PARAM_TABLES_DEFAULT
- See Also:
- Constant Field Values
PARAM_IMAGES_DEFAULT
public static final java.lang.String PARAM_IMAGES_DEFAULT
- See Also:
- Constant Field Values
PARAM_STYLES_DEFAULT
public static final java.lang.String PARAM_STYLES_DEFAULT
- See Also:
- Constant Field Values
PARAM_TEMPLATES_DEFAULT
public static final java.lang.String PARAM_TEMPLATES_DEFAULT
- See Also:
- Constant Field Values
PARAM_FONTS_DEFAULT
public static final java.lang.String PARAM_FONTS_DEFAULT
- See Also:
- Constant Field Values
PARAM_FONT_SIZES_DEFAULT
public static final java.lang.String PARAM_FONT_SIZES_DEFAULT
- See Also:
- Constant Field Values
PARAM_SOURCE_DEFAULT
public static final java.lang.String PARAM_SOURCE_DEFAULT
- See Also:
- Constant Field Values
FckEditorDialog
public FckEditorDialog()
- Empty constructor should only be used by DialogFactory.
getVarName
public java.lang.String getVarName()
- Returns:
- The name of the variable for the editor object
init
public void init(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Content websiteNode,
Content configNode)
throws javax.jcr.RepositoryException
- Specified by:
init
in interface DialogControl
- Overrides:
init
in class DialogControlImpl
- Throws:
javax.jcr.RepositoryException
- See Also:
DialogControl.init(HttpServletRequest, HttpServletResponse, Content, Content)
drawHtml
public void drawHtml(java.io.Writer out)
throws java.io.IOException
- Specified by:
drawHtml
in interface DialogControl
- Overrides:
drawHtml
in class DialogControlImpl
- Throws:
java.io.IOException
- See Also:
DialogControl.drawHtml(Writer)
convertToView
public java.lang.String convertToView(java.lang.String value)
- Parameters:
value
-
- Returns:
escapeJsValue
public java.lang.String escapeJsValue(java.lang.String src)
- Escapes the given String to make it javascript friendly.
(escaping single quotes, double quotes, new lines, backslashes, ...)
- Parameters:
src
-
- Returns:
- escaped js String
- See Also:
StringEscapeUtils.escapeJavaScript(String)
Copyright © 2003-2010 Magnolia International Ltd.. All Rights Reserved.