roosterjs-editor-api
Advanced tools
Comparing version 6.3.0 to 6.3.1
@@ -11,2 +11,7 @@ "use strict"; | ||
execFormatWithUndo_1.default(editor, function () { | ||
var range = editor.getSelectionRange(); | ||
var startPoint = range | ||
? roosterjs_editor_dom_1.normalizeEditorPoint(range.startContainer, range.startOffset) | ||
: null; | ||
var endPoint = range ? roosterjs_editor_dom_1.normalizeEditorPoint(range.endContainer, range.endOffset) : null; | ||
for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) { | ||
@@ -16,2 +21,10 @@ var node = nodes_1[_i]; | ||
} | ||
if (range && | ||
editor.contains(startPoint.containerNode) && | ||
editor.contains(endPoint.containerNode)) { | ||
var newRange = editor.getDocument().createRange(); | ||
newRange.setStart(startPoint.containerNode, startPoint.offset); | ||
newRange.setEnd(endPoint.containerNode, endPoint.offset); | ||
editor.updateSelection(newRange); | ||
} | ||
}); | ||
@@ -18,0 +31,0 @@ } |
@@ -5,8 +5,8 @@ { | ||
"dependencies": { | ||
"roosterjs-editor-types": "6.3.0", | ||
"roosterjs-editor-dom": "6.3.0", | ||
"roosterjs-editor-core": "6.3.0" | ||
"roosterjs-editor-types": "6.3.1", | ||
"roosterjs-editor-dom": "6.3.1", | ||
"roosterjs-editor-core": "6.3.1" | ||
}, | ||
"main": "./lib/index.js", | ||
"version": "6.3.0", | ||
"version": "6.3.1", | ||
"typings": "./lib/index.d.ts", | ||
@@ -13,0 +13,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
199799
2442
+ Addedroosterjs-editor-core@6.3.1(transitive)
+ Addedroosterjs-editor-dom@6.3.1(transitive)
+ Addedroosterjs-editor-types@6.3.1(transitive)
- Removedroosterjs-editor-core@6.3.0(transitive)
- Removedroosterjs-editor-dom@6.3.0(transitive)
- Removedroosterjs-editor-types@6.3.0(transitive)
Updatedroosterjs-editor-core@6.3.1
Updatedroosterjs-editor-dom@6.3.1
Updatedroosterjs-editor-types@6.3.1