Package org.zkoss.stateless.sul
Interface ITbeditor
-
- All Superinterfaces:
IAnyGroup<ITbeditor>,IComponent<ITbeditor>,IHtmlBasedComponent<ITbeditor>,IXulElement<ITbeditor>
public interface ITbeditor extends IXulElement<ITbeditor>, IAnyGroup<ITbeditor>
ImmutableTbeditorcomponentA component which is similar to ckeditor but is lightweight and efficient.
Support @Action
Name Action Type onChange ActionData: InputData
Denotes the content of an input component has been modified by the user.onChanging ActionData: InputData
Denotes that user is changing the content of an input component.Example
@RichletMapping("/example") public IComponent example() { return ITbeditor.of("this is a demo for<b>trumbowy</b>editor!!"); }Customized Properties
Tbeditor provides a way for users to customize their own properties, check official document for the detail. Here shows a simple example how to programmatic change the property.
Note: Not support all properties, for example, localization, custom skin, are not supported.
@RichletMapping("/customizedProperties") public IComponent customizedProperties() { Map config = new HashMap(); config.put("btns", new String[] {"bold", "italic", "link"}); return ITbeditor.of("this is a demo for<b>trumbowy</b>editor!!") .withConfig(config); }- Author:
- katherine
- See Also:
Tbeditor
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classITbeditor.BuilderBuilds instances of typeITbeditor.static classITbeditor.UpdaterBuilds an updater of typeITbeditorforUiAgent.smartUpdate(Locator, SmartUpdater).
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Object>getConfig()Returns the current configuration of the tbeditordefault java.lang.StringgetValue()Returns editor's content with html formatdefault java.lang.StringgetWidgetClass()Returns the client widget class.static ITbeditorof(java.lang.String value)Returns the instance with the given value.static ITbeditorofId(java.lang.String id)Returns the instance with the given id.ITbeditorwithConfig(java.util.Map<java.lang.String,? extends java.lang.Object> config)Returns a copy ofthisimmutable component with the specifiedconfig.ITbeditorwithValue(java.lang.String value)Returns a copy ofthisimmutable component with the specifiedvalue.-
Methods inherited from interface org.zkoss.stateless.sul.IComponent
getAction, getActions, getClientAttributes, getId, getMold, getWidgetListeners, getWidgetOverrides, isVisible, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withActions, withActions, withClientAttribute, withClientAttributes, withId, withMold, withVisible, withWidgetClass, withWidgetListener, withWidgetListeners, withWidgetOverride, withWidgetOverrides
-
Methods inherited from interface org.zkoss.stateless.sul.IHtmlBasedComponent
getClientAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZIndex, isFocus, withClientAction, withDraggable, withDroppable, withFocus, withHeight, withHflex, withLeft, withRenderdefer, withSclass, withStyle, withTabindex, withTabindex, withTooltiptext, withTop, withVflex, withWidth, withZclass, withZIndex
-
Methods inherited from interface org.zkoss.stateless.sul.IXulElement
getContext, getCtrlKeys, getPopup, getTooltip, withContext, withCtrlKeys, withPopup, withTooltip
-
-
-
-
Field Detail
-
DEFAULT
static final ITbeditor DEFAULT
Constant for default attributes of this immutable component.
-
-
Method Detail
-
getWidgetClass
default java.lang.String getWidgetClass()
Returns the client widget class.Default:
"zkmax.tbeditor.Tbeditor"- Specified by:
getWidgetClassin interfaceIComponent<ITbeditor>- Returns:
-
getConfig
@Nullable java.util.Map<java.lang.String,java.lang.Object> getConfig()
Returns the current configuration of the tbeditor
-
withConfig
ITbeditor withConfig(@Nullable java.util.Map<java.lang.String,? extends java.lang.Object> config)
Returns a copy ofthisimmutable component with the specifiedconfig.Sets the editor's configuration,
For more detail, please refer to official document (not support localization for now).
We have to pass a Map as parameter that key is option name, value is option's possible value.
- Parameters:
config- The config to the tbeditorDefault:
null.- Returns:
- A modified copy of the
thisobject
-
getValue
default java.lang.String getValue()
Returns editor's content with html format
-
withValue
ITbeditor withValue(java.lang.String value)
Returns a copy ofthisimmutable component with the specifiedvalue.Sets the editor's content with html format
- Parameters:
value- The config to the tbeditorDefault:
"".- Returns:
- A modified copy of the
thisobject
-
of
static ITbeditor of(java.lang.String value)
Returns the instance with the given value.- Parameters:
value- The html content
-
ofId
static ITbeditor ofId(java.lang.String id)
Returns the instance with the given id.- Parameters:
id- The id to identify this component
-
-