Add JS method to collapse selection in both composer
Collapsing a selection means removing it and keep the cursor at the end. It will be needed by the scribe for "Insert" action where we want to insert a text at the cursor even if the user selected text.
This commit is contained in:
@@ -185,6 +185,10 @@ class _WebEditorState extends State<WebEditorWidget> with TextSelectionMixin {
|
||||
name: HtmlUtils.registerSelectionChangeListener.name,
|
||||
script: HtmlUtils.registerSelectionChangeListener.script,
|
||||
),
|
||||
WebScript(
|
||||
name: HtmlUtils.collapseSelectionToEnd.name,
|
||||
script: HtmlUtils.collapseSelectionToEnd.script,
|
||||
),
|
||||
WebScript(
|
||||
name: HtmlUtils.recalculateEditorHeight(maxHeight: maxHeight).name,
|
||||
script: HtmlUtils.recalculateEditorHeight(maxHeight: maxHeight).script,
|
||||
|
||||
Reference in New Issue
Block a user