BBjHtmlEdit
Description
In BBj 16.0 and higher, the BBjHtmlEdit control implements a rich text editor backed by HTML.
Setting the STBL("!OPTIONS") JAVAFX_HTMLEDIT option to TRUE makes the BBjHtmlEdit control in the Java Swing GUI client use JavaFX (if available). In this configuration, the BBjHtmlEdit uses an embedded WebKit browser, with support for HTML5, CSS, and JavaScript.
In BBj 19.0 and higher, setting the STBL("!OPTIONS") CHROMIUM_HTMLEDIT option to TRUE makes the BBjHtmlEdit control in the Java Swing GUI client use a Chromium engine (if available). In this configuration, the BBjHtmlEdit uses an embedded Chromium-based web browser, with support for HTML5, CSS, and JavaScript.
In BBj 23.00 and higher, the default editor component for the BUI and DWC browser clients is TinyMCE. Setting the STBL("!OPTIONS") CKEDITOR_HTMLEDIT option to TRUE makes the BBjHtmlEdit control in the BUI and DWC browser clients use the original CKEditor 4 editor component. This is a temporary convenience; CKEditor 4 is no longer supported as of June 2023.
Access to the JAVAFX_HTMLEDIT and CHROMIUM_HTMLEDIT features requires an active Software Asset Management (SAM) subscription. See Benefits of ‘Software Asset Management' Feature Line. |
Implemented Interfaces
Creation
BBjAPI > BBjSysGui > BBjWindow > BBjHtmlEdit
A BBjHtmlEdit object is created through the following BBjWindow methods:
Return Value |
Method |
---|---|
BBjHtmlEdit |
addHtmlEdit(int ID, number x, number y, number width, number height, string html) |
BBjHtmlEdit |
addHtmlEdit(int ID, number x, number y, number width, number height, string html, string flags) |
Methods of BBjHtmlEdit
Return Value |
Method |
---|---|
BBjVector | getAvailableSpellCheckLanguages() |
BBjVector | getAvailableStates() |
boolean |
|
string |
|
string |
|
string | getLocale() |
BBjVector | getLocales() |
string |
|
string | getSpellCheckLanguage() |
boolean | getState(String state) |
string |
getText() |
boolean | isSpellChecked() |
void |
setBasicToolbar(boolean basicToolbar) |
void |
setBasicToolbarStyles(BBjVector styles) |
void | setLocale(string locale) |
void |
setPlainText(string text) |
void | setState(String state, Boolean value) |
void | setSpellChecked(boolean spellChecked) |
void | setSpellCheckLanguage(string language) |
void |
setText(string text) |
Methods of BBjHtmlEdit implemented for Focusable
Return Value | Method |
---|---|
boolean | isFocusable() |
void | setFocusable(boolean focus) |
Methods of BBjHtmlEdit implemented for TabTraversable
Return Value | Method |
---|---|
boolean | isTabTraversable() |
void | setTabTraversable(boolean trav) |
Methods of BBjHtmlEdit inherited from BBjControl
Events
Callback Code |
Object-oriented Event |
Read Record Event |
Code |
---|---|---|---|
ON_EDIT_MODIFY |
e |
||
ON_GAINED_FOCUS |
f |
||
ON_LOST_FOCUS |
f |
||
ON_MOUSE_ENTER |
E |
||
ON_MOUSE_EXIT |
E |
||
ON_PAGE_LOADED |
x |
||
ON_POPUP_REQUEST |
r |
||
ON_RIGHT_MOUSE_DOWN |
R |
||
ON_STATE_CHANGE | BBjStateChangeEvent | State Change Event | x |
CSS
The visual appearance of BUI controls is defined using CSS (cascading style sheets) rules. Easily change the default colors, border, and other settings by customizing these rules, all without changing any application code. See CSS API for a high-level overview of BUI CSS.
The BBjHtmlEdit control is a <div> containing an editor component consisting of a toolbar and an editing area. The BBjHtmlEdit defines the following CSS style names:
.BBjHtmlEdit (the top level control)
.BBjHtmlEdit.bbj-disabled (the control is disabled)
Most of the styling happens internally within the editor component; these CSS selectors can only apply minimal additional styling, and some rules may require the use of!importantto override internal editor rules.
STBL Options for BBjHtmlEdit
The BBjHtmlEdit can be configured through STBL options to be either an embedded WebKit browser using JavaFX, or an embedded Chromium-based browser. Using the Chromium browser engine is limited to the operating systems and platforms on which the Chromium engine is supported.
To change the type of browser used by the BBjHtmlEdit, use the STBL("!OPTIONS") JAVAFX_HTMLVIEW option and the STBL("!OPTIONS") CHROMIUM_HTMLEDIT option.
Access to the JAVAFX_HTMLEDIT and CHROMIUM_HTMLEDIT features requires an active Software Asset Management (SAM) subscription. See Benefits of ‘Software Asset Management' Feature Line.
If the Chromium-based BBjHtmlEdit is used, the STBL("!CHROMIUM_DIR") string can specify a preferred client-side directory to extract the Chromium binaries. This can be particularly useful in a BBj environment that runs concurrent thin client sessions against multiple servers, where it may be necessary to specify a different Chromium directory for each server.
Version History
Constants inherited from BBjControl
Example
|
See Also
CALLBACK Verb - Register BBj Subroutine
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.