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

draftjs-utils

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

draftjs-utils - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

4

js/index.js
/* @flow */
import {
colors,
getEntityRange,
setColors,
setFontSizes,

@@ -50,4 +50,4 @@ setFontFamilies,

// Functions related to inline styles
colors,
getEntityRange,
setColors,
setFontSizes,

@@ -54,0 +54,0 @@ setFontFamilies,

@@ -118,12 +118,2 @@ /* @flow */

/**
* Array of colors supported for custom inline styles.
*/
export const colors = ['rgb(97,189,109)', 'rgb(26,188,156)', 'rgb(84,172,210)', 'rgb(44,130,201)',
'rgb(147,101,184)', 'rgb(71,85,119)', 'rgb(204,204,204)', 'rgb(65,168,95)', 'rgb(0,168,133)',
'rgb(61,142,185)', 'rgb(41,105,176)', 'rgb(85,57,130)', 'rgb(40,50,78)', 'rgb(0,0,0)',
'rgb(247,218,100)', 'rgb(251,160,38)', 'rgb(235,107,86)', 'rgb(226,80,65)', 'rgb(163,143,132)',
'rgb(239,239,239)', 'rgb(255,255,255)', 'rgb(250,197,28)', 'rgb(243,121,52)', 'rgb(209,72,65)',
'rgb(184,49,47)', 'rgb(124,112,107)', 'rgb(209,213,216)'];
/**
* Collection of all custom inline styles.

@@ -150,12 +140,18 @@ */

};
colors.forEach((color) => {
customInlineStylesMap.color[`color-${color}`] = {
color,
};
customInlineStylesMap.bgcolor[`bgcolor-${color}`] = {
backgroundColor: color,
};
});
/**
* Set colors.
*/
export const setColors = (colors: Array<string>) => {
colors.forEach((color) => {
customInlineStylesMap.color[`color-${color}`] = {
color,
};
customInlineStylesMap.bgcolor[`bgcolor-${color}`] = {
backgroundColor: color,
};
});
};
/**
* Set font families.

@@ -162,0 +158,0 @@ */

{
"name": "draftjs-utils",
"version": "0.5.0",
"version": "0.5.1",
"description": "Collection of utility function for use with Draftjs.",

@@ -5,0 +5,0 @@ "main": "lib/draftjs-utils.js",

Sorry, the diff of this file is too big to display

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