Tbeditor"

From Documentation
Line 11: Line 11:
  
 
The component wraps [http://alex-d.github.io/Trumbowyg/ Trumbowyg]
 
The component wraps [http://alex-d.github.io/Trumbowyg/ Trumbowyg]
 +
== Bundled Versions==
 +
 +
{| class="wikitable"
 +
|-
 +
! ZK !! Trumbowyg
 +
|-
 +
| 9.6.0+ || 2.7.2
 +
|-
 +
| 8.5.0 || 2.6
 +
|-
 +
| 8.0.0 || 2.0.0-beta.2
 +
|}
  
 
= Example =
 
= Example =

Revision as of 09:10, 27 September 2023

Tbeditor

Since 8.0.0

Employment/Purpose

Tbeditor is a rich text editor to be used inside web pages. It's a WYSIWYG editor, which means that the text being edited on it looks as similar as possible to the results users have when publishing it.

The component wraps Trumbowyg

Bundled Versions

ZK Trumbowyg
9.6.0+ 2.7.2
8.5.0 2.6
8.0.0 2.0.0-beta.2

Example

Zkcompref tbeditor.png

<tbeditor id="tb" value="this is a demo for &lt;b&gt;trumbowy&lt;/b&gt; editor!!" />

Customized Properties

Tbeditor provides a way for users to customize their own properties, check official document for the detail[1]. Here shows a simple example how to programmatic change the property.

Map config = new HashMap();
config.put("btns", new String[] {"bold", "italic", "link"});
config.put("closable", true);
tb.setConfig(config);

We create a map while key is property name with reasonable value. Note that we have to wrap the value into JavaScriptValue object if it's not String.


  1. Not support all properties, for example, localization, custom skin, are not supported.

Supported Events

Name
Event Type
onChange
InputEvent

Denotes that the content of the component has been modified by a user

onChanging
InputEvent

Denotes that a user is changing the content of an input component. Notice that the component's content (at the server) won't be changed until onChange is received. Thus, you have to invoke the getValue method in the InputEvent class to retrieve the temporary value.

Supported Children

*NONE



Last Update : 2023/09/27

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.