Skip to content

Commit

Permalink
Update bundle, fix Italic detection in Markdown editor
Browse files Browse the repository at this point in the history
  • Loading branch information
bennothommo committed Dec 31, 2023
1 parent e66e433 commit 09bd7fc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions modules/backend/formwidgets/codeeditor/assets/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,16 @@ import { parse as parseXml } from 'fast-plist';
return this.editor.getSelection();
}

/**
* Gets the current editor selection.
*
* This is the same as `getSelection`, except that the selection range is copied to a new object to prevent any changes to the selection range from modifying positioning properties.
*/
getSafeSelection() {
const selection = this.editor.getSelection();
return new monaco.Selection(selection.startLineNumber, selection.startColumn, selection.endLineNumber, selection.endColumn);
}

/**
* Gets the current editor selections.
*
Expand Down
Loading

0 comments on commit 09bd7fc

Please sign in to comment.