@techie_doubts/editor-plugin-color-syntax 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,521 @@
1
+ /*!
2
+ * TOAST UI Editor : Color Syntax Plugin
3
+ * @version 3.1.0 | Sat Feb 21 2026
4
+ * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
+ * @license MIT
6
+ */
7
+ (function webpackUniversalModuleDefinition(root, factory) {
8
+ if(typeof exports === 'object' && typeof module === 'object')
9
+ module.exports = factory(require("@techie_doubts/tui.color-picker.2026"));
10
+ else if(typeof define === 'function' && define.amd)
11
+ define(["@techie_doubts/tui.color-picker.2026"], factory);
12
+ else if(typeof exports === 'object')
13
+ exports["toastui"] = factory(require("@techie_doubts/tui.color-picker.2026"));
14
+ else
15
+ root["toastui"] = root["toastui"] || {}, root["toastui"]["Editor"] = root["toastui"]["Editor"] || {}, root["toastui"]["Editor"]["plugin"] = root["toastui"]["Editor"]["plugin"] || {}, root["toastui"]["Editor"]["plugin"]["uml"] = factory(root["tui"]["colorPicker"]);
16
+ })(self, function(__WEBPACK_EXTERNAL_MODULE__0__) {
17
+ return /******/ (function() { // webpackBootstrap
18
+ /******/ "use strict";
19
+ /******/ var __webpack_modules__ = ([
20
+ /* 0 */
21
+ /***/ (function(module) {
22
+
23
+ module.exports = __WEBPACK_EXTERNAL_MODULE__0__;
24
+
25
+ /***/ })
26
+ /******/ ]);
27
+ /************************************************************************/
28
+ /******/ // The module cache
29
+ /******/ var __webpack_module_cache__ = {};
30
+ /******/
31
+ /******/ // The require function
32
+ /******/ function __webpack_require__(moduleId) {
33
+ /******/ // Check if module is in cache
34
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
35
+ /******/ if (cachedModule !== undefined) {
36
+ /******/ return cachedModule.exports;
37
+ /******/ }
38
+ /******/ // Create a new module (and put it into the cache)
39
+ /******/ var module = __webpack_module_cache__[moduleId] = {
40
+ /******/ // no module.id needed
41
+ /******/ // no module.loaded needed
42
+ /******/ exports: {}
43
+ /******/ };
44
+ /******/
45
+ /******/ // Execute the module function
46
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
47
+ /******/
48
+ /******/ // Return the exports of the module
49
+ /******/ return module.exports;
50
+ /******/ }
51
+ /******/
52
+ /************************************************************************/
53
+ /******/ /* webpack/runtime/compat get default export */
54
+ /******/ !function() {
55
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
56
+ /******/ __webpack_require__.n = function(module) {
57
+ /******/ var getter = module && module.__esModule ?
58
+ /******/ function() { return module['default']; } :
59
+ /******/ function() { return module; };
60
+ /******/ __webpack_require__.d(getter, { a: getter });
61
+ /******/ return getter;
62
+ /******/ };
63
+ /******/ }();
64
+ /******/
65
+ /******/ /* webpack/runtime/define property getters */
66
+ /******/ !function() {
67
+ /******/ // define getter functions for harmony exports
68
+ /******/ __webpack_require__.d = function(exports, definition) {
69
+ /******/ for(var key in definition) {
70
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
71
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
72
+ /******/ }
73
+ /******/ }
74
+ /******/ };
75
+ /******/ }();
76
+ /******/
77
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
78
+ /******/ !function() {
79
+ /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
80
+ /******/ }();
81
+ /******/
82
+ /************************************************************************/
83
+ var __webpack_exports__ = {};
84
+
85
+ // EXPORTS
86
+ __webpack_require__.d(__webpack_exports__, {
87
+ "default": function() { return /* binding */ colorSyntaxPlugin; }
88
+ });
89
+
90
+ // EXTERNAL MODULE: external {"commonjs":"@techie_doubts/tui.color-picker.2026","commonjs2":"@techie_doubts/tui.color-picker.2026","amd":"@techie_doubts/tui.color-picker.2026","root":["tui","colorPicker"]}
91
+ var tui_color_picker_2026_root_tui_colorPicker_ = __webpack_require__(0);
92
+ var tui_color_picker_2026_root_tui_colorPicker_default = /*#__PURE__*/__webpack_require__.n(tui_color_picker_2026_root_tui_colorPicker_);
93
+ ;// ./src/i18n/langs.ts
94
+ function addLangs(i18n) {
95
+ i18n.setLanguage('ar', {
96
+ 'Text color': 'لون النص',
97
+ 'Background color': 'لون الخلفية',
98
+ });
99
+ i18n.setLanguage(['cs', 'cs-CZ'], {
100
+ 'Text color': 'Barva textu',
101
+ 'Background color': 'Barva pozadí',
102
+ });
103
+ i18n.setLanguage(['de', 'de-DE'], {
104
+ 'Text color': 'Textfarbe',
105
+ 'Background color': 'Hintergrundfarbe',
106
+ });
107
+ i18n.setLanguage(['en', 'en-US'], {
108
+ 'Text color': 'Text color',
109
+ 'Background color': 'Background color',
110
+ });
111
+ i18n.setLanguage(['es', 'es-ES'], {
112
+ 'Text color': 'Color del texto',
113
+ 'Background color': 'Color de fondo',
114
+ });
115
+ i18n.setLanguage(['fi', 'fi-FI'], {
116
+ 'Text color': 'Tekstin väri',
117
+ 'Background color': 'Taustaväri',
118
+ });
119
+ i18n.setLanguage(['fr', 'fr-FR'], {
120
+ 'Text color': 'Couleur du texte',
121
+ 'Background color': 'Couleur de fond',
122
+ });
123
+ i18n.setLanguage(['gl', 'gl-ES'], {
124
+ 'Text color': 'Cor do texto',
125
+ 'Background color': 'Cor de fondo',
126
+ });
127
+ i18n.setLanguage(['hr', 'hr-HR'], {
128
+ 'Text color': 'Boja teksta',
129
+ 'Background color': 'Boja pozadine',
130
+ });
131
+ i18n.setLanguage(['it', 'it-IT'], {
132
+ 'Text color': 'Colore del testo',
133
+ 'Background color': 'Colore di sfondo',
134
+ });
135
+ i18n.setLanguage(['ja', 'ja-JP'], {
136
+ 'Text color': '文字色相',
137
+ 'Background color': '背景色',
138
+ });
139
+ i18n.setLanguage(['ko', 'ko-KR'], {
140
+ 'Text color': '글자 색상',
141
+ 'Background color': '배경 색상',
142
+ });
143
+ i18n.setLanguage(['nb', 'nb-NO'], {
144
+ 'Text color': 'Tekstfarge',
145
+ 'Background color': 'Bakgrunnsfarge',
146
+ });
147
+ i18n.setLanguage(['nl', 'nl-NL'], {
148
+ 'Text color': 'Tekstkleur',
149
+ 'Background color': 'Achtergrondkleur',
150
+ });
151
+ i18n.setLanguage(['pl', 'pl-PL'], {
152
+ 'Text color': 'Kolor tekstu',
153
+ 'Background color': 'Kolor tła',
154
+ });
155
+ i18n.setLanguage(['pt', 'pt-BR'], {
156
+ 'Text color': 'Cor do texto',
157
+ 'Background color': 'Cor de fundo',
158
+ });
159
+ i18n.setLanguage(['ru', 'ru-RU'], {
160
+ 'Text color': 'Цвет текста',
161
+ 'Background color': 'Цвет фона',
162
+ });
163
+ i18n.setLanguage(['sv', 'sv-SE'], {
164
+ 'Text color': 'Textfärg',
165
+ 'Background color': 'Bakgrundsfärg',
166
+ });
167
+ i18n.setLanguage(['tr', 'tr-TR'], {
168
+ 'Text color': 'Metin rengi',
169
+ 'Background color': 'Arka plan rengi',
170
+ });
171
+ i18n.setLanguage(['uk', 'uk-UA'], {
172
+ 'Text color': 'Колір тексту',
173
+ 'Background color': 'Колір фону',
174
+ });
175
+ i18n.setLanguage('zh-CN', {
176
+ 'Text color': '文字颜色',
177
+ 'Background color': '背景颜色',
178
+ });
179
+ i18n.setLanguage('zh-TW', {
180
+ 'Text color': '文字顏色',
181
+ 'Background color': '背景顏色',
182
+ });
183
+ }
184
+
185
+ ;// ./src/utils/dom.ts
186
+ function hasClass(element, className) {
187
+ return element.classList.contains(className);
188
+ }
189
+ function findParentByClassName(el, className) {
190
+ var currentEl = el;
191
+ while (currentEl && !hasClass(currentEl, className)) {
192
+ currentEl = currentEl.parentElement;
193
+ }
194
+ return currentEl;
195
+ }
196
+ function removeProseMirrorHackNodes(html) {
197
+ var reProseMirrorImage = /<img class="ProseMirror-separator" alt="">/g;
198
+ var reProseMirrorTrailingBreak = / class="ProseMirror-trailingBreak"/g;
199
+ var resultHTML = html;
200
+ resultHTML = resultHTML.replace(reProseMirrorImage, '');
201
+ resultHTML = resultHTML.replace(reProseMirrorTrailingBreak, '');
202
+ return resultHTML;
203
+ }
204
+
205
+ ;// ./src/index.ts
206
+
207
+
208
+
209
+
210
+ var PREFIX = 'toastui-editor-';
211
+ // ---------------------------------------------------------------------------
212
+ // Style helpers
213
+ // ---------------------------------------------------------------------------
214
+ function parseStyleString(style) {
215
+ var result = {};
216
+ if (!style) {
217
+ return result;
218
+ }
219
+ style.split(';').forEach(function (part) {
220
+ var colon = part.indexOf(':');
221
+ if (colon > 0) {
222
+ var key = part.slice(0, colon).trim();
223
+ var val = part.slice(colon + 1).trim();
224
+ if (key && val) {
225
+ result[key] = val;
226
+ }
227
+ }
228
+ });
229
+ return result;
230
+ }
231
+ function buildStyleString(styles) {
232
+ return Object.keys(styles)
233
+ .map(function (k) { return k + ": " + styles[k]; })
234
+ .join('; ');
235
+ }
236
+ function getExistingSpanStyle(selection, schema) {
237
+ var $from = selection.$from;
238
+ var spanType = schema.marks.span;
239
+ if (!spanType) {
240
+ return '';
241
+ }
242
+ if (!selection.empty) {
243
+ var from = selection.from, to = selection.to;
244
+ var style_1 = '';
245
+ $from.doc.nodesBetween(from, to, function (node) {
246
+ if (style_1 || !node.isText) {
247
+ return;
248
+ }
249
+ var m = spanType.isInSet(node.marks);
250
+ if (m) {
251
+ style_1 = (m.attrs.htmlAttrs && m.attrs.htmlAttrs.style) || '';
252
+ }
253
+ });
254
+ return style_1;
255
+ }
256
+ var mark = spanType.isInSet($from.marks());
257
+ if (mark) {
258
+ return (mark.attrs.htmlAttrs && mark.attrs.htmlAttrs.style) || '';
259
+ }
260
+ if ($from.nodeBefore) {
261
+ var m = spanType.isInSet($from.nodeBefore.marks);
262
+ if (m) {
263
+ return (m.attrs.htmlAttrs && m.attrs.htmlAttrs.style) || '';
264
+ }
265
+ }
266
+ return '';
267
+ }
268
+ // ---------------------------------------------------------------------------
269
+ // Markdown helpers: detect and rewrite existing <span style="..."> wrappers
270
+ // ---------------------------------------------------------------------------
271
+ var RE_SPAN_WRAP = /^<span\s+style="([^"]*)">([\s\S]*)<\/span>$/i;
272
+ function parseMdSpanStyle(text) {
273
+ var m = RE_SPAN_WRAP.exec(text);
274
+ if (!m) {
275
+ return null;
276
+ }
277
+ return { inner: m[2], styles: parseStyleString(m[1]) };
278
+ }
279
+ // ---------------------------------------------------------------------------
280
+ // DOM helpers
281
+ // ---------------------------------------------------------------------------
282
+ function createApplyButton(text) {
283
+ var button = document.createElement('button');
284
+ button.setAttribute('type', 'button');
285
+ button.textContent = text;
286
+ return button;
287
+ }
288
+ function getCurrentEditorEl(el, containerCls) {
289
+ var root = findParentByClassName(el, PREFIX + "defaultUI");
290
+ return root.querySelector("." + containerCls + " .ProseMirror");
291
+ }
292
+ function createColorPicker(preset, usageStatistics, i18n) {
293
+ var container = document.createElement('div');
294
+ var option = {
295
+ container: container,
296
+ usageStatistics: usageStatistics,
297
+ };
298
+ if (preset) {
299
+ option.preset = preset;
300
+ }
301
+ var picker = tui_color_picker_2026_root_tui_colorPicker_default().create(option);
302
+ var button = createApplyButton(i18n.get('OK'));
303
+ picker.slider.toggle(true);
304
+ container.appendChild(button);
305
+ return { container: container, picker: picker, button: button };
306
+ }
307
+ // ---------------------------------------------------------------------------
308
+ // Plugin
309
+ // ---------------------------------------------------------------------------
310
+ var containerClassName;
311
+ var currentEditorEl;
312
+ /**
313
+ * Color syntax plugin with text color and background color toolbar buttons.
314
+ */
315
+ function colorSyntaxPlugin(context, options) {
316
+ if (options === void 0) { options = {}; }
317
+ var eventEmitter = context.eventEmitter, i18n = context.i18n, _a = context.usageStatistics, usageStatistics = _a === void 0 ? true : _a, pmState = context.pmState;
318
+ var preset = options.preset;
319
+ addLangs(i18n);
320
+ // --- text color picker (original) --------------------------------------
321
+ var textPicker = createColorPicker(preset, usageStatistics, i18n);
322
+ // --- background color picker (new) -------------------------------------
323
+ var bgPicker = createColorPicker(preset, usageStatistics, i18n);
324
+ // --- focus tracking ----------------------------------------------------
325
+ eventEmitter.listen('focus', function (editType) {
326
+ containerClassName = "" + PREFIX + (editType === 'markdown' ? 'md' : 'ww') + "-container";
327
+ });
328
+ // --- text color OK click -----------------------------------------------
329
+ textPicker.container.addEventListener('click', function (ev) {
330
+ if (ev.target.getAttribute('type') === 'button') {
331
+ var hexInput = textPicker.container.querySelector('.tui-colorpicker-palette-hex');
332
+ var selectedColor = hexInput ? hexInput.value.trim() : textPicker.picker.getColor();
333
+ currentEditorEl = getCurrentEditorEl(textPicker.container, containerClassName);
334
+ currentEditorEl.focus();
335
+ eventEmitter.emit('command', 'color', { selectedColor: selectedColor });
336
+ eventEmitter.emit('closePopup');
337
+ }
338
+ });
339
+ // --- background color OK click -----------------------------------------
340
+ bgPicker.container.addEventListener('click', function (ev) {
341
+ if (ev.target.getAttribute('type') === 'button') {
342
+ var hexInput = bgPicker.container.querySelector('.tui-colorpicker-palette-hex');
343
+ var selectedColor = hexInput ? hexInput.value.trim() : bgPicker.picker.getColor();
344
+ currentEditorEl = getCurrentEditorEl(bgPicker.container, containerClassName);
345
+ currentEditorEl.focus();
346
+ eventEmitter.emit('command', 'bgColor', { selectedColor: selectedColor });
347
+ eventEmitter.emit('closePopup');
348
+ }
349
+ });
350
+ // --- toolbar items -----------------------------------------------------
351
+ var textToolbarItem = {
352
+ name: 'color',
353
+ tooltip: i18n.get('Text color'),
354
+ className: PREFIX + "toolbar-icons color",
355
+ popup: {
356
+ className: PREFIX + "popup-color",
357
+ body: textPicker.container,
358
+ style: { width: 'auto' },
359
+ },
360
+ };
361
+ var bgToolbarItem = {
362
+ name: 'bgColor',
363
+ tooltip: i18n.get('Background color'),
364
+ className: PREFIX + "toolbar-icons bgcolor",
365
+ text: 'BG',
366
+ popup: {
367
+ className: PREFIX + "popup-color",
368
+ body: bgPicker.container,
369
+ style: { width: 'auto' },
370
+ },
371
+ };
372
+ // --- commands -----------------------------------------------------------
373
+ return {
374
+ markdownCommands: {
375
+ color: function (payload, _a, dispatch) {
376
+ var tr = _a.tr, selection = _a.selection, schema = _a.schema;
377
+ var selectedColor = (payload || {}).selectedColor;
378
+ if (typeof selectedColor === 'undefined') {
379
+ return false;
380
+ }
381
+ var slice = selection.content();
382
+ var rawText = slice.content.textBetween(0, slice.content.size, '\n');
383
+ var parsed = parseMdSpanStyle(rawText);
384
+ var existing = parsed ? parsed.styles : {};
385
+ var inner = parsed ? parsed.inner : rawText;
386
+ if (selectedColor) {
387
+ existing.color = selectedColor;
388
+ }
389
+ else {
390
+ delete existing.color;
391
+ }
392
+ var styleStr = buildStyleString(existing);
393
+ if (styleStr) {
394
+ var fullText = "<span style=\"" + styleStr + "\">" + inner + "</span>";
395
+ tr.replaceSelectionWith(schema.text(fullText));
396
+ var start = tr.mapping.map(selection.from);
397
+ tr.setSelection(pmState.TextSelection.create(tr.doc, start, start + fullText.length));
398
+ }
399
+ else if (inner) {
400
+ tr.replaceSelectionWith(schema.text(inner));
401
+ }
402
+ dispatch(tr);
403
+ return true;
404
+ },
405
+ bgColor: function (payload, _a, dispatch) {
406
+ var tr = _a.tr, selection = _a.selection, schema = _a.schema;
407
+ var selectedColor = (payload || {}).selectedColor;
408
+ if (typeof selectedColor === 'undefined') {
409
+ return false;
410
+ }
411
+ var slice = selection.content();
412
+ var rawText = slice.content.textBetween(0, slice.content.size, '\n');
413
+ var parsed = parseMdSpanStyle(rawText);
414
+ var existing = parsed ? parsed.styles : {};
415
+ var inner = parsed ? parsed.inner : rawText;
416
+ if (selectedColor) {
417
+ existing.background = selectedColor;
418
+ }
419
+ else {
420
+ delete existing.background;
421
+ }
422
+ var styleStr = buildStyleString(existing);
423
+ if (styleStr) {
424
+ var fullText = "<span style=\"" + styleStr + "\">" + inner + "</span>";
425
+ tr.replaceSelectionWith(schema.text(fullText));
426
+ var start = tr.mapping.map(selection.from);
427
+ tr.setSelection(pmState.TextSelection.create(tr.doc, start, start + fullText.length));
428
+ }
429
+ else if (inner) {
430
+ tr.replaceSelectionWith(schema.text(inner));
431
+ }
432
+ dispatch(tr);
433
+ return true;
434
+ },
435
+ },
436
+ wysiwygCommands: {
437
+ color: function (payload, _a, dispatch) {
438
+ var tr = _a.tr, selection = _a.selection, schema = _a.schema;
439
+ var selectedColor = (payload || {}).selectedColor;
440
+ if (typeof selectedColor === 'undefined') {
441
+ return false;
442
+ }
443
+ var from = selection.from, to = selection.to;
444
+ var existingStyle = getExistingSpanStyle(selection, schema);
445
+ var existing = parseStyleString(existingStyle);
446
+ if (selectedColor) {
447
+ existing.color = selectedColor;
448
+ }
449
+ else {
450
+ delete existing.color;
451
+ }
452
+ var styleStr = buildStyleString(existing);
453
+ if (styleStr) {
454
+ var attrs = { htmlAttrs: { style: styleStr } };
455
+ tr.addMark(from, to, schema.marks.span.create(attrs));
456
+ }
457
+ else {
458
+ tr.removeMark(from, to, schema.marks.span);
459
+ }
460
+ tr.setSelection(pmState.TextSelection.create(tr.doc, from, to));
461
+ dispatch(tr);
462
+ return true;
463
+ },
464
+ bgColor: function (payload, _a, dispatch) {
465
+ var tr = _a.tr, selection = _a.selection, schema = _a.schema;
466
+ var selectedColor = (payload || {}).selectedColor;
467
+ if (typeof selectedColor === 'undefined') {
468
+ return false;
469
+ }
470
+ var from = selection.from, to = selection.to;
471
+ var existingStyle = getExistingSpanStyle(selection, schema);
472
+ var existing = parseStyleString(existingStyle);
473
+ if (selectedColor) {
474
+ existing.background = selectedColor;
475
+ }
476
+ else {
477
+ delete existing.background;
478
+ }
479
+ var styleStr = buildStyleString(existing);
480
+ if (styleStr) {
481
+ var attrs = { htmlAttrs: { style: styleStr } };
482
+ tr.addMark(from, to, schema.marks.span.create(attrs));
483
+ }
484
+ else {
485
+ tr.removeMark(from, to, schema.marks.span);
486
+ }
487
+ tr.setSelection(pmState.TextSelection.create(tr.doc, from, to));
488
+ dispatch(tr);
489
+ return true;
490
+ },
491
+ },
492
+ toolbarItems: [
493
+ {
494
+ groupIndex: 0,
495
+ itemIndex: 3,
496
+ item: textToolbarItem,
497
+ },
498
+ {
499
+ groupIndex: 0,
500
+ itemIndex: 4,
501
+ item: bgToolbarItem,
502
+ },
503
+ ],
504
+ toHTMLRenderers: {
505
+ htmlInline: {
506
+ span: function (node, _a) {
507
+ var entering = _a.entering;
508
+ return entering
509
+ ? { type: 'openTag', tagName: 'span', attributes: node.attrs }
510
+ : { type: 'closeTag', tagName: 'span' };
511
+ },
512
+ },
513
+ },
514
+ };
515
+ }
516
+
517
+ __webpack_exports__ = __webpack_exports__["default"];
518
+ /******/ return __webpack_exports__;
519
+ /******/ })()
520
+ ;
521
+ });
@@ -0,0 +1,153 @@
1
+ /*!
2
+ * TOAST UI Editor : Color Syntax Plugin
3
+ * @version 3.1.0 | Fri Feb 20 2026
4
+ * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
+ * @license MIT
6
+ */
7
+
8
+ .toastui-editor-popup-color {
9
+ padding: 0;
10
+ }
11
+
12
+ .toastui-editor-popup-color .tui-colorpicker-container,
13
+ .toastui-editor-popup-color .tui-colorpicker-palette-container {
14
+ width: 147px;
15
+ }
16
+
17
+ .toastui-editor-popup-color .tui-colorpicker-container ul {
18
+ width: 152px;
19
+ margin-bottom: 10px;
20
+ }
21
+
22
+ .toastui-editor-popup-color .tui-colorpicker-container li {
23
+ padding: 0 3px 3px 0;
24
+ }
25
+
26
+ .toastui-editor-popup-color .tui-colorpicker-container li .tui-colorpicker-palette-button {
27
+ border: solid 1px rgba(0, 0, 0, 0.1);
28
+ border-radius: 50%;
29
+ box-sizing: border-box;
30
+ width: 16px;
31
+ height: 16px;
32
+ }
33
+
34
+ .toastui-editor-popup-color .tui-popup-body {
35
+ padding: 10px;
36
+ }
37
+
38
+ .toastui-editor-popup-color .tui-colorpicker-container .tui-colorpicker-palette-toggle-slider {
39
+ display: none;
40
+ }
41
+
42
+ .toastui-editor-popup-color .tui-colorpicker-container .tui-colorpicker-svg-slider {
43
+ border-radius: 3px;
44
+ border: solid 1px rgba(0, 0, 0, 0.05);
45
+ }
46
+
47
+
48
+ .toastui-editor-popup-color .tui-colorpicker-palette-hex {
49
+ float: right;
50
+ }
51
+
52
+ .toastui-editor-popup-body input[type='text'].tui-colorpicker-palette-hex {
53
+ font-family: inherit;
54
+ font-size: 13px;
55
+ height: 24px;
56
+ width: 65px;
57
+ padding: 3px 25px 3px 10px;
58
+ border: 1px solid #e1e3e9;
59
+ border-radius: 2px;
60
+ float: left;
61
+ }
62
+
63
+ .toastui-editor-popup-color button {
64
+ height: 32px;
65
+ width: 40px;
66
+ color: #555;
67
+ background: #f7f9fc;
68
+ border: 1px solid #e1e3e9;
69
+ top: 68px;
70
+ position: absolute;
71
+ right: 15px;
72
+ }
73
+
74
+ .toastui-editor-popup-color button:hover {
75
+ border-color: #cbcfdb;
76
+ }
77
+
78
+ .toastui-editor-popup-color .tui-colorpicker-container div.tui-colorpicker-clearfix {
79
+ display: inline-block;
80
+ margin: 5px 0;
81
+ width: 102px;
82
+ }
83
+
84
+ .toastui-editor-popup-color .tui-colorpicker-container .tui-colorpicker-palette-preview {
85
+ margin-top: 8px;
86
+ margin-left: -22px;
87
+ width: 16px;
88
+ height: 16px;
89
+ border-radius: 50%;
90
+ border: solid 1px rgba(0, 0, 0, 0.1);
91
+ box-sizing: border-box;
92
+ }
93
+
94
+ .toastui-editor-popup-color .tui-colorpicker-slider-container .tui-colorpicker-slider-right {
95
+ width: 19px;
96
+ }
97
+
98
+ .toastui-editor-popup-color .tui-colorpicker-slider-container .tui-colorpicker-svg-huebar {
99
+ border: solid 1px rgba(0, 0, 0, 0.05);
100
+ border-radius: 3px;
101
+ overflow: auto;
102
+ }
103
+
104
+ .toastui-editor-popup-color .tui-colorpicker-slider-container .tui-colorpicker-huebar-handle {
105
+ display: none;
106
+ }
107
+
108
+ .toastui-editor-toolbar-icons.color {
109
+ background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIxMTYiIHZpZXdCb3g9IjAgMCAyNCAxMTYiPgogICAgPGcgZmlsbD0ibm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AgICAgICAgICAgICAgICAgICAgPGc+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8cGF0aCBmaWxsPSIjRUVFIiBkPSJNMiA4LjI1TDEwIDguMjUgMTAgOS43NSAyIDkuNzV6IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg2IDQuNzUpIi8+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8cGF0aCBzdHJva2U9IiNFRUUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxLjUiIGQ9Ik0wIDE0LjVMNiAwIDEyIDE0LjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDYgNC43NSkiLz4KICAgICAgICAgICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICAgICAgICAgICAgICA8cmVjdCB3aWR0aD0iNSIgaGVpZ2h0PSI1IiB4PSIxOCIgeT0iNCIgZmlsbD0iI0ZGNDg0OCIgcng9IjIuNSIvPgogICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDxnPgogICAgICAgICAgICAgICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKC02MDAgLTE5MikgdHJhbnNsYXRlKDYwMCAxOTIpIHRyYW5zbGF0ZSgwIDI2KSI+CiAgICAgICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0wIDBIMjRWMjRIMHoiLz4KICAgICAgICAgICAgICAgICAgICAgICAgPGc+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8cGF0aCBmaWxsPSIjMDBBOUZGIiBkPSJNMiA4LjI1TDEwIDguMjUgMTAgOS43NSAyIDkuNzV6IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg2IDQuNzUpIi8+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8cGF0aCBzdHJva2U9IiMwMEE5RkYiIHN0cm9rZS1saW5lY2FwPS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xOCIgeT0iNCIgZmlsbD0iI0ZGNDg0OCIgcng9IjIuNSIvPgogICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDxnIGZpbGw9IiNGRkYiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLW9wYWNpdHk9Ii4yIj4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNNiAuNWMxLjUxOSAwIDIuODk0LjYxNiAzLjg5IDEuNjEuOTk0Ljk5NiAxLjYxIDIuMzcxIDEuNjEgMy44OSAwIDEuNTE5LS42MTYgMi44OTQtMS42MSAzLjg5LS45OTYuOTk0LTIuMzcxIDEuNjEtMy44OSAxLjYxLTEuNTE5IDAtMi44OTQtLjYxNi0zLjg5LTEuNjFDMS4xMTcgOC44OTMuNSA3LjUxOC41IDZjMC0xLjUxOS42MTYtMi44OTQgMS42MS0zLjg5QzMuMTA3IDEuMTE3IDQuNDgyLjUgNiAuNXpNNiAzYy0uODI4IDAtMS41NzguMzM2LTIuMTIxLjg3OUMzLjMzNiA0LjQyMiAzIDUuMTcyIDMgNmMwIC44MjguMzM2IDEuNTc4Ljg3OSAyLjEyMUM0LjQyMiA4LjY2NCA1LjE3MiA5IDYgOWMuODI4IDAgMS41NzgtLjMzNiAyLjEyMS0uODc5QzguNjY0IDcuNTc4IDkgNi44MjggOSA2YzAtLjgyOC0uMzM2LTEuNTc4LS44NzktMi4xMjFDNy41NzggMy4zMzYgNi44MjggMyA2IDN6IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtNjAwIC0xOTIpIHRyYW5zbGF0ZSg2MDAgMTkyKSB0cmFuc2xhdGUoMCAxMDQpIi8+CiAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPgo=);
110
+ background-size: 23px 112px;
111
+ background-position: 3px 3px;
112
+ }
113
+
114
+ .toastui-editor-dark .toastui-editor-toolbar-icons.color {
115
+ background-position-y: -47px;
116
+ }
117
+
118
+ .toastui-editor-dark .toastui-editor-popup-body input[type='text'].tui-colorpicker-palette-hex {
119
+ border-color: #303238;
120
+ }
121
+
122
+ .toastui-editor-dark .toastui-editor-popup-color button {
123
+ color: #eee;
124
+ border-color: #303238;
125
+ background-color: #232428;
126
+ }
127
+
128
+ .toastui-editor-dark .toastui-editor-popup-color button:hover {
129
+ border-color: #494c56;
130
+ }
131
+
132
+ .toastui-editor-dark .toastui-editor-popup-color .tui-colorpicker-container li .tui-colorpicker-palette-button {
133
+ border-color: rgba(255, 255, 255, 0.1);
134
+ }
135
+
136
+ .toastui-editor-dark .toastui-editor-popup-color .tui-colorpicker-container .tui-colorpicker-svg-slider,
137
+ .toastui-editor-dark .toastui-editor-popup-color .tui-colorpicker-slider-container .tui-colorpicker-svg-huebar {
138
+ border-color: rgba(255, 255, 255, 0.05);
139
+ }
140
+
141
+ .toastui-editor-toolbar-icons.bgcolor {
142
+ background: none;
143
+ font-size: 11px;
144
+ font-weight: bold;
145
+ line-height: 30px;
146
+ text-indent: 0;
147
+ color: #555;
148
+ }
149
+
150
+ .toastui-editor-dark .toastui-editor-toolbar-icons.bgcolor {
151
+ color: #eee;
152
+ }
153
+