Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

roosterjs-editor-api

Package Overview
Dependencies
Maintainers
2
Versions
317
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

roosterjs-editor-api - npm Package Compare versions

Comparing version 6.3.3 to 6.3.4

16

lib/format/clearFormat.js
"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 @@ }

8

package.json

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc