roosterjs-editor-api
Advanced tools
Comparing version 6.3.3 to 6.3.4
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var execFormatWithUndo_1 = require("./execFormatWithUndo"); | ||
var setBackgroundColor_1 = require("./setBackgroundColor"); | ||
var setFontName_1 = require("./setFontName"); | ||
var setFontSize_1 = require("./setFontSize"); | ||
var setTextColor_1 = require("./setTextColor"); | ||
var roosterjs_editor_core_1 = require("roosterjs-editor-core"); | ||
function clearFormat(editor) { | ||
@@ -9,3 +14,12 @@ editor.focus(); | ||
execFormatWithUndo_1.default(editor, function () { | ||
editor.getDocument().execCommand('removeFormat', false, null); | ||
editor.runWithoutAddingUndoSnapshot(function () { | ||
editor.getDocument().execCommand('removeFormat', false, null); | ||
if (roosterjs_editor_core_1.browserData.isEdge || roosterjs_editor_core_1.browserData.isIE) { | ||
var defaultFormat = editor.getDefaultFormat(); | ||
setFontName_1.default(editor, defaultFormat.fontFamily); | ||
setFontSize_1.default(editor, defaultFormat.fontSize); | ||
setTextColor_1.default(editor, defaultFormat.textColor); | ||
setBackgroundColor_1.default(editor, defaultFormat.backgroundColor); | ||
} | ||
}); | ||
}); | ||
@@ -12,0 +26,0 @@ } |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var execFormatWithUndo_1 = require("./execFormatWithUndo"); | ||
var getFormatState_1 = require("../format/getFormatState"); | ||
var queryNodesWithSelection_1 = require("../cursor/queryNodesWithSelection"); | ||
function setIndentation(editor, indentation) { | ||
@@ -8,3 +10,11 @@ editor.focus(); | ||
execFormatWithUndo_1.default(editor, function () { | ||
var format = getFormatState_1.default(editor); | ||
editor.getDocument().execCommand(command, false, null); | ||
if (!format.isBullet && !format.isNumbering) { | ||
var nodes = queryNodesWithSelection_1.default(editor, 'blockquote'); | ||
nodes.forEach(function (node) { | ||
node.style.marginTop = '0px'; | ||
node.style.marginBottom = '0px'; | ||
}); | ||
} | ||
}); | ||
@@ -11,0 +21,0 @@ } |
@@ -5,8 +5,8 @@ { | ||
"dependencies": { | ||
"roosterjs-editor-types": "6.3.3", | ||
"roosterjs-editor-dom": "6.3.3", | ||
"roosterjs-editor-core": "6.3.3" | ||
"roosterjs-editor-types": "6.3.4", | ||
"roosterjs-editor-dom": "6.3.4", | ||
"roosterjs-editor-core": "6.3.4" | ||
}, | ||
"main": "./lib/index.js", | ||
"version": "6.3.3", | ||
"version": "6.3.4", | ||
"typings": "./lib/index.d.ts", | ||
@@ -13,0 +13,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
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
201971
2466
+ Addedroosterjs-editor-core@6.3.4(transitive)
+ Addedroosterjs-editor-dom@6.3.4(transitive)
+ Addedroosterjs-editor-types@6.3.4(transitive)
- Removedroosterjs-editor-core@6.3.3(transitive)
- Removedroosterjs-editor-dom@6.3.3(transitive)
- Removedroosterjs-editor-types@6.3.3(transitive)
Updatedroosterjs-editor-core@6.3.4
Updatedroosterjs-editor-dom@6.3.4
Updatedroosterjs-editor-types@6.3.4