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>

  Immutable `Tbeditor` component

  A 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 class` | `ITbeditor.Builder` | Builds instances of type `ITbeditor`.
    `static class` | `ITbeditor.Updater` | Builds an updater of type `ITbeditor` for `UiAgent.smartUpdate(Locator, SmartUpdater)`.

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static ITbeditor` | `DEFAULT` | Constant for default attributes of this immutable component.

  - ### 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 tbeditor
    `default java.lang.String` | `getValue()` | Returns editor's content with html format
    `default java.lang.String` | `getWidgetClass()` | Returns the client widget class.
    `static ITbeditor` | `of​(java.lang.String value)` | Returns the instance with the given value.
    `static ITbeditor` | `ofId​(java.lang.String id)` | Returns the instance with the given id.
    `ITbeditor` | `withConfig​(java.util.Map<java.lang.String,​? extends java.lang.Object> config)` | Returns a copy of `this` immutable component with the specified `config`.
    `ITbeditor` | `withValue​(java.lang.String value)` | Returns a copy of `this` immutable component with the specified `value`.

    - ### 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:
        `getWidgetClass` in interface `IComponent<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 of `this` immutable component with the specified `config`.

      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 tbeditor

        Default: `null`.

      Returns:
        A modified copy of the `this` object

    - #### getValue

          default java.lang.String getValue()

      Returns editor's content with html format

    - #### withValue

          ITbeditor withValue​(java.lang.String value)

      Returns a copy of `this` immutable component with the specified `value`.

      Sets the editor's content with html format

      Parameters:
        `value` - The config to the tbeditor

        Default: `""`.

      Returns:
        A modified copy of the `this` object

    - #### 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