From 387d6c266066d8d13267f60e0d24c6ea802fcedd Mon Sep 17 00:00:00 2001 From: Aleksander Nowodzinski Date: Wed, 12 Feb 2020 09:35:32 +0100 Subject: [PATCH] Moved normalizeColorCode() helper from ckeditor5-ui. --- src/utils.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/utils.js b/src/utils.js index 7b0e1a1..67147c8 100644 --- a/src/utils.js +++ b/src/utils.js @@ -8,7 +8,6 @@ */ import ColorTableView from './ui/colortableview'; -import { normalizeColorCode } from '@ckeditor/ckeditor5-ui/src/colorgrid/utils'; /** * The name of the font size plugin. @@ -112,3 +111,11 @@ export function addColorTableToDropdown( { dropdownView, colors, columns, remove return colorTableView; } + +// Fixes the color value string. +// +// @param {String} value +// @returns {String} +function normalizeColorCode( value ) { + return value.replace( /\s/g, '' ); +}