Smart Document Editor
Last updated
Was this helpful?
Last updated
Was this helpful?
(part of package '') Extends designtime/SolutionModel: Extends runtime:
A Servoy Extra Component that provides a rich document editor with advanced formatting capabilities.
This is a reference page; many components have detailed usage guides .
Bound data provider identifier for the document content. Type:
Flag indicating whether the editor content is editable. Type: Default Value: true
Attach a style sheet to add or overwrite content styles used by the editor. Make sure to prefix all classes with the .ck-content
class.
Type:
The language used in the editor. Type: Default Value: null
Fired when an action is triggered in the editor.
Parameters:
Fired when the editor's data changes.
Parameters:
Fired when an error occurs in the editor.
Parameters:
Fired when a file is uploaded through the editor.
Parameters:
Fired when the editor gains focus.
Parameters:
Fired when the editor loses focus.
Parameters:
Fired when the editor is fully initialized and ready.
Add input to current cursor position, will return false when in readOnly mode
Example:
Parameters:
Add tag to current cursor position, will return false when in readOnly mode
Example:
Parameters:
(Re-)Creates the editor using the given config
Example:
Parameters:
Returns a toolbarItem that can be provided as one of the toolbar items on a toolbar property of an editor's config
Example:
Parameters:
Executes the specified command with given parameters.
Example:
Parameters:
Retrieves the CSS styles applied to the editor. Optionally filters the styles based on a provided stylesheet name.
Example:
Parameters:
Retrieves the HTML content of the editor, optionally including inline CSS styles.
Example:
Parameters:
Retrieves the CSS content used for printing the editor's content.
Example:
Inserts an image into the current cursor position within the editor.
Example:
Parameters:
Return if the editor is in preview mode (CKEditor readOnly).
@public
Preview Editor HTML data into the editor
@public
Parameters:
Request the focus to this editor.
Example:
Force the autosave trigger of the editor to get all latest changes
Example:
Sets the mention feeds for the editor, allowing users to insert predefined mentions into the document. Mention feeds provide a way to define markers and associated content for quick insertion, such as tagging users or inserting placeholders.
Example:
Parameters:
Undo Preview Editor HTML data into the editor
@public
Parameters:
Represents a mention feed configuration for the editor. scripting type: CustomType<smartdocumenteditor-smartdocumenteditor.mentionFeed>
feedItems
Array of mention feed items.
itemEditable
Flag indicating whether items in the mention feed are editable.
Default Value: false
marker
Marker used to trigger the mention feed (e.g. '@' or '#').
minimumCharacters
Minimum number of characters required before triggering the mention feed.
valueList
Identifier for the value list providing options for the mention feed.
Represents an individual mention feed item. scripting type: CustomType<smartdocumenteditor-smartdocumenteditor.mentionFeedItem>
displayValue
The display value of the mention feed item.
format
Format string for displaying the mention feed item.
realValue
The actual value associated with the mention feed item.
Represents the toolbar configuration for the editor. scripting type: CustomType<smartdocumenteditor-smartdocumenteditor.toolbar>
items
Array of toolbar items.
shouldNotGroupWhenFull
Flag indicating whether toolbar items should not be grouped when the toolbar is full.
Default Value: false
Represents a single toolbar item in the editor. scripting type: CustomType<smartdocumenteditor-smartdocumenteditor.toolbarItem>
iconStyleClass
CSS style classes applied to the toolbar item's icon.
ignoreReadOnly
When true, the toolbar item ignores the editor's readOnly state.
isEnabled
Flag indicating whether the toolbar item is enabled.
Default Value: true
keystroke
The keystroke associated with the toolbar item.
label
Label text for the toolbar item.
name
Unique name of the toolbar item.
onClick
Function to be called when the toolbar item is clicked.
styleClass
CSS style classes applied to the toolbar item.
tooltip
Tooltip text for the toolbar item.
type
The type of the toolbar item (e.g. bold, italic, fontSize, etc.).
Default Value: null
valueList
Value list providing options for the toolbar item.
withText
When true, the toolbar item displays both an icon and text.
withTooltip
When true, the toolbar item shows a tooltip.
Array of mention feed configurations for the editor. Each mention feed defines a marker and associated feed items for quick insertion. Type:
Editor's min height. It's none by default. So when you want the height to be resposive and would like to have a min height for the editor, set responsiveHeight as 0 and this property with the value that fits your needs. Type: Default Value: null
Flag indicating whether to overwrite the default tab behavior for the editor. Type: Default Value: true
Editor's height to be set in a responsive form. When responsiveHeight is set to 0, the editor will use 100% height of the parent container. When value is set to -1 it will be based on the content. Type: Default Value: 500
Flag indicating whether the inspector is shown. (Deprecated in later versions.) Type: Default Value: false
Flag indicating whether the toolbar is visible. Type: Default Value: true
CSS style classes applied to the editor component. Type:
Configure toolbar items Type:
The view type of the editor. Possible values are "WEB" or "DOCUMENT". Type: Default Value: "DOCUMENT"
Flag indicating whether the editor is visible. Type:
{} event The event object associated with the action.
{} oldValue The previous document content.
{} newValue The new document content.
{} event The event object associated with the data change.
Returns: {}
{} errorMessage The error message.
{} errorStack The error stack trace.
{} file The file object that was uploaded.
{} event The event object associated with the focus gain.
{} event The event object associated with the focus loss.
{} input The text or input content to insert at the current cursor position.
Returns: True if the input was successfully added; false if the editor is in readOnly mode.
{} marker The prefix marker (e.g., '@', '#') to associate with the tag.
{} tag The tag content to insert at the current cursor position.
Returns: True if the tag was successfully added; false if the editor is in readOnly mode.
{} config The configuration object containing settings for initializing or reinitializing the editor.
{} name The (unique) name of this toolbar item
{} onClick The callback method to fire when the item is clicked
Returns: A toolbar item object that can be used in the editor's toolbar configuration.
{} command The name of the command to execute
{} [commandParameters] Optional command parameters
{} [filterStylesheetName] The name of the stylesheet to filter styles. If omitted, all styles are returned.
Returns: A string containing the CSS styles.
{} [withInlineCSS] Specifies whether to include inline CSS styles in the HTML content.
{} [filterStylesheetName] The name of the stylesheet to filter the inline styles (if withInlineCSS is true).
Returns: The HTML content of the editor, or null if the editor instance is not initialized.
Returns: The CSS content used for printing.
{} source A path to a valid image accessible from the editor's context.
Returns: True if the editor is in preview (readOnly) mode; otherwise, false.
{} html The HTML content to display in the editor preview.
{} [readOnly] Set the editor to readOnly mode (default: true).
Returns: The data currently in the editor.
{} mentionFeeds An array of mention feed configurations. Each mention feed defines a marker (e.g., '@' or '#') and the associated feed items or value lists to provide options for insertion.
{} [readOnly] Set component into readOnly mode (default: false)
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type: