com.atlassian.confluence.tinymceplugin
Class TinyMceEditor
java.lang.Object
com.atlassian.confluence.tinymceplugin.TinyMceEditor
- All Implemented Interfaces:
- Editor
public class TinyMceEditor
- extends Object
- implements Editor
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PLUGIN_KEY
public static final String PLUGIN_KEY
- See Also:
- Constant Field Values
WEB_RESOURCES_KEY
public static final String WEB_RESOURCES_KEY
- See Also:
- Constant Field Values
TinyMceEditor
public TinyMceEditor()
getResourcesKey
public String getResourcesKey()
- Description copied from interface:
Editor
- Returns the complete module key of the editor's web resources to be included.
One of the web resources must return some javascript that allows Confluence to interface with the editor.
The Javascript returned must define the folowing functions under the namespace AJS.Editor.Adapter:
onShowEditor() -- this is called just after the DIV containing the editor is made visible. It is a hook where you
can place any special code needed at this point.
onHideEditor() -- this is called just before the DIV containing the editor is hidden. It is a hook where you
can place any special code needed at this point.
setEditorValue(newValue) -- put the text in newValue into the editor. This is called when the editor needs new
content -- it is *not* called to set the initial content. That should be done either by providing the
editor with the content as part of the initial HTML, or by calling javascript from editorOnLoad().
allowModeChange() -- return true if the editor is in a state where changes from rich text to markup and vice versa are allowed.
getEditorHTML() -- return the current HTML contents of the editor. This *must* return a JavaScript string,
not a JavaObject wrapping a java.lang.String!
editorOnLoad() -- called in the page's onLoad handler, place any initialization needed at this point here.
editorHasContentChanged() -- return true if the contents of the editor has been modified by the user since
the last time editorResetContentChanged().
editorResetContentChanged() -- called to reset the contents change indicator
- Specified by:
getResourcesKey
in interface Editor
getDivContentsTemplate
public String getDivContentsTemplate()
- Description copied from interface:
Editor
- Returns the div contents to display the editor itself.
- Specified by:
getDivContentsTemplate
in interface Editor
- Returns:
- a String containing a velocity template
supportedUserAgent
public boolean supportedUserAgent(String userAgent)
- Description copied from interface:
Editor
- Return true if the user agent string indicates a browser which is supported by this editor
- Specified by:
supportedUserAgent
in interface Editor
- Returns:
- true if this editor is supported
escapeHtml
public String escapeHtml(String html)
- Description copied from interface:
Editor
- Perform any necessary escaping of the HTML rendered by Confluence. The AbstractPreviewPageAction.getWysiwygContent()
method uses this method to escape the rendered HTML.
- Specified by:
escapeHtml
in interface Editor
getJavascriptTemplate
public String getJavascriptTemplate()
- Specified by:
getJavascriptTemplate
in interface Editor
Copyright © 2003-2011 Atlassian. All Rights Reserved.