org.xwiki.gwt.wysiwyg.client
Class WysiwygEditorConfig

java.lang.Object
  extended by org.xwiki.gwt.wysiwyg.client.WysiwygEditorConfig
All Implemented Interfaces:
com.google.gwt.event.shared.EventHandler, com.google.gwt.user.client.Window.ClosingHandler

public class WysiwygEditorConfig
extends java.lang.Object
implements com.google.gwt.user.client.Window.ClosingHandler

WYSIWYG Editor configuration. Use this class to access the WYSIWYG editor configuration in a strong-typed manner and to cache configuration values.

Version:
$Id: WysiwygEditorConfig.java 31679 2010-10-08 15:53:52Z mflorea $

Field Summary
static java.lang.String DEFAULT_SYNTAX
          The default storage syntax.
static int SOURCE_TAB_INDEX
          Source tab index in the TabPanel.
static int WYSIWYG_TAB_INDEX
          WYWISYWG tab index in the TabPanel.
 
Constructor Summary
WysiwygEditorConfig(Config config)
          Creates a new WYSIWYG editor configuration object based on the given configuration source.
 
Method Summary
 Config getConfigurationSource()
           
 Element getHook()
           
 java.lang.String getInputValue()
           
 int getSelectedTabIndex()
           
 java.lang.String getSyntax()
           
 java.lang.String getTemplateURL()
           
 boolean isDebugMode()
           
 boolean isInputConverted()
           
 boolean isTabbed()
           
 void onWindowClosing(com.google.gwt.user.client.Window.ClosingEvent event)
          
 void setInputConverted(boolean inputConverted)
          Sets whether the WYSIWYG editor needs to convert its input from source syntax to HTML.
 void setSelectedTabIndex(int selectedTabIndex)
          Caches the active text area.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SYNTAX

public static final java.lang.String DEFAULT_SYNTAX
The default storage syntax.

See Also:
Constant Field Values

WYSIWYG_TAB_INDEX

public static final int WYSIWYG_TAB_INDEX
WYWISYWG tab index in the TabPanel.

See Also:
Constant Field Values

SOURCE_TAB_INDEX

public static final int SOURCE_TAB_INDEX
Source tab index in the TabPanel.

See Also:
Constant Field Values
Constructor Detail

WysiwygEditorConfig

public WysiwygEditorConfig(Config config)
Creates a new WYSIWYG editor configuration object based on the given configuration source.

Parameters:
config - the configuration source
Method Detail

getSyntax

public java.lang.String getSyntax()
Returns:
the syntax used to store the edited content

isInputConverted

public boolean isInputConverted()
Returns:
true if the WYSIWYG editor input value is HTML (no conversion is required), false otherwise (the input value is in source syntax and needs to be converted to HTML)

setInputConverted

public void setInputConverted(boolean inputConverted)
Sets whether the WYSIWYG editor needs to convert its input from source syntax to HTML.

Parameters:
inputConverted - true if the WYSIWYG editor doesn't need to convert its input value because it's HTML, false otherwise (the editor needs to convert the input value from source syntax to HTML)

getHook

public Element getHook()
Returns:
the element that is replaced by the WYSIWYG editor

getInputValue

public java.lang.String getInputValue()
Returns:
WYSIWYG editor input value

isTabbed

public boolean isTabbed()
Returns:
true if the WYSIWYG/Source tabs are displayed, false otherwise

getSelectedTabIndex

public int getSelectedTabIndex()
Returns:
the index of the tab that should be selected when the WYSIWYG editor is loaded

setSelectedTabIndex

public void setSelectedTabIndex(int selectedTabIndex)
Caches the active text area.

Parameters:
selectedTabIndex - the index of the selected tab

getTemplateURL

public java.lang.String getTemplateURL()
Returns:
rich text area's template URL

isDebugMode

public boolean isDebugMode()
Returns:
true if the WYSIWYG editor is in debug mode, false otherwise

getConfigurationSource

public Config getConfigurationSource()
Returns:
the configuration source

onWindowClosing

public void onWindowClosing(com.google.gwt.user.client.Window.ClosingEvent event)

Specified by:
onWindowClosing in interface com.google.gwt.user.client.Window.ClosingHandler
See Also:
ClosingHandler#onWindowClosing(ClosingEvent)


Copyright © 2004-2011 XWiki. All Rights Reserved.