Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Moved normalizeColorCode() helper from ckeditor5-ui.
Browse files Browse the repository at this point in the history
  • Loading branch information
oleq committed Feb 12, 2020
1 parent 8f1935d commit 387d6c2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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, '' );
}

0 comments on commit 387d6c2

Please sign in to comment.