@StyleSheet(value={"vaadin://mediumeditor/css/medium-editor.min.css","vaadin://mediumeditor/css/addon.min.css"})
@JavaScript(value={"vaadin://mediumeditor/js/medium-editor.min.js","vaadin://mediumeditor/js/medium-editor-connector.js"})
public class MediumEditor
extends com.vaadin.ui.AbstractJavaScriptComponent
| Modifier and Type | Class and Description |
|---|---|
static interface |
MediumEditor.BlurListener |
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listenercom.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener| Constructor and Description |
|---|
MediumEditor() |
| Modifier and Type | Method and Description |
|---|---|
void |
addBlurListener(MediumEditor.BlurListener listener)
Add a listener to handle the changed value from the editor.
|
void |
configure(Options.OptionsBuilder builder)
Configure the MediumEditor.
|
protected MediumEditorState |
getState() |
boolean |
isFocusOutlineEnabled()
If true the focus outline border is enabled else disabled.
|
boolean |
isJsLoggingEnabled() |
boolean |
isReadOnly() |
Options.OptionsBuilder |
options()
Returns the starting point for configuring the editor's options.
|
void |
setContent(java.lang.String content)
Set the content of editor
|
void |
setFocusOutlineEnabled(boolean focusOutlineEnabled)
Enables or disables the border around the component when it gets the focus.
|
void |
setJsLoggingEnabled(boolean jsLoggingEnabled)
Enable or disables the connector's logging to "console.log"
|
void |
setReadOnly(boolean readOnly)
Enable or disables the inline editing.
|
void |
setTheme(MediumEditorTheme theme)
Sets the theme of the medium editor.
|
addFunction, callFunction, getState, registerRpcaddContextClickListener, addListener, addShortcutListener, addStyleName, attach, beforeClientResponse, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, focus, getActionManager, getCaption, getComponentError, getCustomAttributes, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isRequiredIndicatorVisible, isResponsive, isVisible, readDesign, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeight, setHeightUndefined, setIcon, setId, setLocale, setParent, setPrimaryStyleName, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setStyleName, setVisible, setWidth, setWidth, setWidthUndefined, writeDesignaddAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstateclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddAttachListener, addDetachListener, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlerpublic void configure(Options.OptionsBuilder builder)
builder - the option builder. Start by using options().public Options.OptionsBuilder options()
public void setContent(java.lang.String content)
content - the editor content / value.public void addBlurListener(MediumEditor.BlurListener listener)
listener - a simple blurlistener retrieving just the valuepublic boolean isJsLoggingEnabled()
public void setJsLoggingEnabled(boolean jsLoggingEnabled)
jsLoggingEnabled - If true the connector script will log defined messages to "console.log". Defaults to false.public void setReadOnly(boolean readOnly)
setReadOnly in class com.vaadin.ui.AbstractComponentreadOnly - If true no editing is possible. Defaults to false.public boolean isReadOnly()
isReadOnly in class com.vaadin.ui.AbstractComponentpublic void setFocusOutlineEnabled(boolean focusOutlineEnabled)
focusOutlineEnabled - True if a border around the component should be shown as soon as it gets the focus. If you don't like the border set it to false. Defaults to true.public boolean isFocusOutlineEnabled()
public void setTheme(MediumEditorTheme theme)
theme - the medium editor theme.protected MediumEditorState getState()
getState in class com.vaadin.ui.AbstractJavaScriptComponent