Rich Text Editor Widgets (DEPRECATED)
Note: This feature has been deprecated due to the planned change of the underlying Rich Text Editor which will come with a new extensibility API.
Widgets functionality provides a way to add UI of any complexity and seamlessly integrate these UIs in Rich Text Editor experiences. The widget could be introduced by the following code:
rte: {
getWidgets: () => [
{
id: "variable-list-widget",
label: "My Variables",
url: "/index.html#/variables",
},
]
}
The code above will add a new My Variables context menu option to the dialog that could be triggered by pressing { key. This option will open a popup window with the content provided by specified url. This URL is relative to the extension, so if your extension is hosted on abc.com domain the result URL will be abc.com/index.html#/variables. On this URL your extension may render the UI of any complexity using the JS framework of your choice.
API Reference
Extension API
stringstringstringInstructions API
Widget window MAY call a connection.host.rte.applyInstructions method and provide RTE instruction to execute:
replaceContentstringvalue propertyinsertContentstringvalue property in current carret position