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

braft-utils

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

braft-utils - npm Package Compare versions

Comparing version 0.0.21 to 0.0.22

21

dist/content.js

@@ -11,4 +11,2 @@ 'use strict';

var _color = require('./color');
var _braftConvert = require('braft-convert');

@@ -68,8 +66,11 @@

if (override) {
return (0, _draftjsUtils.setBlockData)(editorState, blockData);
} else {
var allBlockData = this.getSelectionBlockData(editorState).toJS();
return (0, _draftjsUtils.setBlockData)(editorState, Object.assign({}, allBlockData, blockData));
}
var newBlockData = override ? blockData : Object.assign({}, this.getSelectionBlockData(editorState).toJS(), blockData);
Object.keys(newBlockData).forEach(function (key) {
if (newBlockData.hasOwnProperty(key) && newBlockData[key] === undefined) {
delete newBlockData[key];
}
});
return (0, _draftjsUtils.setBlockData)(editorState, newBlockData);
},

@@ -164,7 +165,7 @@ getSelectionBlockData: function getSelectionBlockData(editorState, name) {

var currentIndent = this.getSelectionBlockData(editorState, 'textIndent');
var currentIndent = this.getSelectionBlockData(editorState, 'textIndent') || 0;
return this.toggleSelectionIndent(editorState, currentIndent + 1, maxIndent);
},
decreaseSelectionIndent: function decreaseSelectionIndent(editorState) {
var currentIndent = this.getSelectionBlockData(editorState, 'textIndent');
var currentIndent = this.getSelectionBlockData(editorState, 'textIndent') || 0;
return this.toggleSelectionIndent(editorState, currentIndent - 1);

@@ -171,0 +172,0 @@ },

{
"name": "braft-utils",
"version": "0.0.21",
"version": "0.0.22",
"description": "Utils for Braft Editor",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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