{"version":3,"file":"wysiwyg.min.js","sources":["../../../src/plugins/wysiwyg/js/mdb/util/index.js","../../../src/plugins/wysiwyg/js/mdb/dom/data.js","../../../src/plugins/wysiwyg/js/mdb/dom/manipulator.js","../../../src/plugins/wysiwyg/js/mdb/dom/polyfill.js","../../../src/plugins/wysiwyg/js/mdb/dom/event-handler.js","../../../src/plugins/wysiwyg/js/mdb/dom/selector-engine.js","../../../src/plugins/wysiwyg/js/templates.js","../../../src/plugins/wysiwyg/js/wysiwyg.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000;\nconst MILLISECONDS_MULTIPLIER = 1000;\nconst TRANSITION_END = 'transitionend';\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = (obj) => {\n if (obj === null || obj === undefined) {\n return `${obj}`;\n }\n\n return {}.toString\n .call(obj)\n .match(/\\s([a-z]+)/i)[1]\n .toLowerCase();\n};\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = (prefix) => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID);\n } while (document.getElementById(prefix));\n\n return prefix;\n};\n\nconst getSelector = (element) => {\n let selector = element.getAttribute('data-mdb-target');\n\n if (!selector || selector === '#') {\n const hrefAttr = element.getAttribute('href');\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;\n }\n\n return selector;\n};\n\nconst getSelectorFromElement = (element) => {\n const selector = getSelector(element);\n\n if (selector) {\n return document.querySelector(selector) ? selector : null;\n }\n\n return null;\n};\n\nconst getElementFromSelector = (element) => {\n const selector = getSelector(element);\n\n return selector ? document.querySelector(selector) : null;\n};\n\nconst getTransitionDurationFromElement = (element) => {\n if (!element) {\n return 0;\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element);\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration);\n const floatTransitionDelay = Number.parseFloat(transitionDelay);\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0;\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0];\n transitionDelay = transitionDelay.split(',')[0];\n\n return (\n (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) *\n MILLISECONDS_MULTIPLIER\n );\n};\n\nconst triggerTransitionEnd = (element) => {\n element.dispatchEvent(new Event(TRANSITION_END));\n};\n\nconst isElement = (obj) => (obj[0] || obj).nodeType;\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false;\n const durationPadding = 5;\n const emulatedDuration = duration + durationPadding;\n\n function listener() {\n called = true;\n element.removeEventListener(TRANSITION_END, listener);\n }\n\n element.addEventListener(TRANSITION_END, listener);\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element);\n }\n }, emulatedDuration);\n};\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach((property) => {\n const expectedTypes = configTypes[property];\n const value = config[property];\n const valueType = value && isElement(value) ? 'element' : toType(value);\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new Error(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`\n );\n }\n });\n};\n\nconst isVisible = (element) => {\n if (!element) {\n return false;\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element);\n const parentNodeStyle = getComputedStyle(element.parentNode);\n\n return (\n elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n );\n }\n\n return false;\n};\n\nconst findShadowRoot = (element) => {\n if (!document.documentElement.attachShadow) {\n return null;\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode();\n return root instanceof ShadowRoot ? root : null;\n }\n\n if (element instanceof ShadowRoot) {\n return element;\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null;\n }\n\n return findShadowRoot(element.parentNode);\n};\n\nconst noop = () => function () {};\n\nconst reflow = (element) => element.offsetHeight;\n\nconst getjQuery = () => {\n const { jQuery } = window;\n\n if (jQuery && !document.body.hasAttribute('data-mdb-no-jquery')) {\n return jQuery;\n }\n\n return null;\n};\n\nconst onDOMContentLoaded = (callback) => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback);\n } else {\n callback();\n }\n};\n\nconst isRTL = document.documentElement.dir === 'rtl';\n\nconst array = (collection) => {\n return Array.from(collection);\n};\n\nconst element = (tag) => {\n return document.createElement(tag);\n};\n\nexport {\n getjQuery,\n TRANSITION_END,\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n findShadowRoot,\n noop,\n reflow,\n array,\n element,\n onDOMContentLoaded,\n isRTL,\n};\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-alpha1): dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst mapData = (() => {\n const storeData = {};\n let id = 1;\n return {\n set(element, key, data) {\n if (typeof element[key] === 'undefined') {\n element[key] = {\n key,\n id,\n };\n id++;\n }\n\n storeData[element[key].id] = data;\n },\n get(element, key) {\n if (!element || typeof element[key] === 'undefined') {\n return null;\n }\n\n const keyProperties = element[key];\n if (keyProperties.key === key) {\n return storeData[keyProperties.id];\n }\n\n return null;\n },\n delete(element, key) {\n if (typeof element[key] === 'undefined') {\n return;\n }\n\n const keyProperties = element[key];\n if (keyProperties.key === key) {\n delete storeData[keyProperties.id];\n delete element[key];\n }\n },\n };\n})();\n\nconst Data = {\n setData(instance, key, data) {\n mapData.set(instance, key, data);\n },\n getData(instance, key) {\n return mapData.get(instance, key);\n },\n removeData(instance, key) {\n mapData.delete(instance, key);\n },\n};\n\nexport default Data;\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nfunction normalizeData(val) {\n if (val === 'true') {\n return true;\n }\n\n if (val === 'false') {\n return false;\n }\n\n if (val === Number(val).toString()) {\n return Number(val);\n }\n\n if (val === '' || val === 'null') {\n return null;\n }\n\n return val;\n}\n\nfunction normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, (chr) => `-${chr.toLowerCase()}`);\n}\n\nconst Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-mdb-${normalizeDataKey(key)}`, value);\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-mdb-${normalizeDataKey(key)}`);\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {};\n }\n\n const attributes = {\n ...element.dataset,\n };\n\n Object.keys(attributes)\n .filter((key) => key.startsWith('mdb'))\n .forEach((key) => {\n let pureKey = key.replace(/^mdb/, '');\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length);\n attributes[pureKey] = normalizeData(attributes[key]);\n });\n\n return attributes;\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-mdb-${normalizeDataKey(key)}`));\n },\n\n offset(element) {\n const rect = element.getBoundingClientRect();\n\n return {\n top: rect.top + document.body.scrollTop,\n left: rect.left + document.body.scrollLeft,\n };\n },\n\n position(element) {\n return {\n top: element.offsetTop,\n left: element.offsetLeft,\n };\n },\n\n style(element, style) {\n Object.assign(element.style, style);\n },\n\n toggleClass(element, className) {\n if (!element) {\n return;\n }\n\n if (element.classList.contains(className)) {\n element.classList.remove(className);\n } else {\n element.classList.add(className);\n }\n },\n\n addClass(element, className) {\n if (element.classList.contains(className)) return;\n element.classList.add(className);\n },\n\n addStyle(element, style) {\n Object.keys(style).forEach((property) => {\n element.style[property] = style[property];\n });\n },\n\n removeClass(element, className) {\n if (!element.classList.contains(className)) return;\n element.classList.remove(className);\n },\n\n hasClass(element, className) {\n return element.classList.contains(className);\n },\n};\n\nexport default Manipulator;\n","/* istanbul ignore file */\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-alpha1): dom/polyfill.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { getUID } from '../util/index';\n\nlet findElements = Element.prototype.querySelectorAll;\nlet findElement = Element.prototype.querySelector;\n\n// MSEdge resets defaultPrevented flag upon dispatchEvent call if at least one listener is attached\nconst defaultPreventedPreservedOnDispatch = (() => {\n const e = new CustomEvent('Bootstrap', {\n cancelable: true,\n });\n\n const element = document.createElement('div');\n element.addEventListener('Bootstrap', () => null);\n\n e.preventDefault();\n element.dispatchEvent(e);\n return e.defaultPrevented;\n})();\n\nconst scopeSelectorRegex = /:scope\\b/;\nconst supportScopeQuery = (() => {\n const element = document.createElement('div');\n\n try {\n element.querySelectorAll(':scope *');\n } catch (_) {\n return false;\n }\n\n return true;\n})();\n\nif (!supportScopeQuery) {\n findElements = function (selector) {\n if (!scopeSelectorRegex.test(selector)) {\n return this.querySelectorAll(selector);\n }\n\n const hasId = Boolean(this.id);\n\n if (!hasId) {\n this.id = getUID('scope');\n }\n\n let nodeList = null;\n try {\n selector = selector.replace(scopeSelectorRegex, `#${this.id}`);\n nodeList = this.querySelectorAll(selector);\n } finally {\n if (!hasId) {\n this.removeAttribute('id');\n }\n }\n\n return nodeList;\n };\n\n findElement = function (selector) {\n if (!scopeSelectorRegex.test(selector)) {\n return this.querySelector(selector);\n }\n\n const matches = find.call(this, selector);\n\n if (typeof matches[0] !== 'undefined') {\n return matches[0];\n }\n\n return null;\n };\n}\n\nconst find = findElements;\nconst findOne = findElement;\n\nexport { find, findOne, defaultPreventedPreservedOnDispatch };\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-alpha1): dom/event-handler.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { defaultPreventedPreservedOnDispatch } from './polyfill';\nimport { getjQuery } from '../util/index';\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst $ = getjQuery();\nconst namespaceRegex = /[^.]*(?=\\..*)\\.|.*/;\nconst stripNameRegex = /\\..*/;\nconst stripUidRegex = /::\\d+$/;\nconst eventRegistry = {}; // Events storage\nlet uidEvent = 1;\nconst customEvents = {\n mouseenter: 'mouseover',\n mouseleave: 'mouseout',\n};\nconst nativeEvents = [\n 'click',\n 'dblclick',\n 'mouseup',\n 'mousedown',\n 'contextmenu',\n 'mousewheel',\n 'DOMMouseScroll',\n 'mouseover',\n 'mouseout',\n 'mousemove',\n 'selectstart',\n 'selectend',\n 'keydown',\n 'keypress',\n 'keyup',\n 'orientationchange',\n 'touchstart',\n 'touchmove',\n 'touchend',\n 'touchcancel',\n 'pointerdown',\n 'pointermove',\n 'pointerup',\n 'pointerleave',\n 'pointercancel',\n 'gesturestart',\n 'gesturechange',\n 'gestureend',\n 'focus',\n 'blur',\n 'change',\n 'reset',\n 'select',\n 'submit',\n 'focusin',\n 'focusout',\n 'load',\n 'unload',\n 'beforeunload',\n 'resize',\n 'move',\n 'DOMContentLoaded',\n 'readystatechange',\n 'error',\n 'abort',\n 'scroll',\n];\n\n/**\n * ------------------------------------------------------------------------\n * Private methods\n * ------------------------------------------------------------------------\n */\n\nfunction getUidEvent(element, uid) {\n return (uid && `${uid}::${uidEvent++}`) || element.uidEvent || uidEvent++;\n}\n\nfunction getEvent(element) {\n const uid = getUidEvent(element);\n\n element.uidEvent = uid;\n eventRegistry[uid] = eventRegistry[uid] || {};\n\n return eventRegistry[uid];\n}\n\nfunction bootstrapHandler(element, fn) {\n return function handler(event) {\n if (handler.oneOff) {\n EventHandler.off(element, event.type, fn);\n }\n\n return fn.apply(element, [event]);\n };\n}\n\nfunction bootstrapDelegationHandler(element, selector, fn) {\n return function handler(event) {\n const domElements = element.querySelectorAll(selector);\n\n for (let { target } = event; target && target !== this; target = target.parentNode) {\n for (let i = domElements.length; i--; '') {\n if (domElements[i] === target) {\n if (handler.oneOff) {\n EventHandler.off(element, event.type, fn);\n }\n\n return fn.apply(target, [event]);\n }\n }\n }\n\n // To please ESLint\n return null;\n };\n}\n\nfunction findHandler(events, handler, delegationSelector = null) {\n const uidEventList = Object.keys(events);\n\n for (let i = 0, len = uidEventList.length; i < len; i++) {\n const event = events[uidEventList[i]];\n\n if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {\n return event;\n }\n }\n\n return null;\n}\n\nfunction normalizeParams(originalTypeEvent, handler, delegationFn) {\n const delegation = typeof handler === 'string';\n const originalHandler = delegation ? delegationFn : handler;\n\n // allow to get the native events from namespaced events ('click.bs.button' --> 'click')\n let typeEvent = originalTypeEvent.replace(stripNameRegex, '');\n const custom = customEvents[typeEvent];\n\n if (custom) {\n typeEvent = custom;\n }\n\n const isNative = nativeEvents.indexOf(typeEvent) > -1;\n\n if (!isNative) {\n typeEvent = originalTypeEvent;\n }\n\n return [delegation, originalHandler, typeEvent];\n}\n\nfunction addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return;\n }\n\n if (!handler) {\n handler = delegationFn;\n delegationFn = null;\n }\n\n const [delegation, originalHandler, typeEvent] = normalizeParams(\n originalTypeEvent,\n handler,\n delegationFn\n );\n const events = getEvent(element);\n const handlers = events[typeEvent] || (events[typeEvent] = {});\n const previousFn = findHandler(handlers, originalHandler, delegation ? handler : null);\n\n if (previousFn) {\n previousFn.oneOff = previousFn.oneOff && oneOff;\n\n return;\n }\n\n const uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''));\n const fn = delegation\n ? bootstrapDelegationHandler(element, handler, delegationFn)\n : bootstrapHandler(element, handler);\n\n fn.delegationSelector = delegation ? handler : null;\n fn.originalHandler = originalHandler;\n fn.oneOff = oneOff;\n fn.uidEvent = uid;\n handlers[uid] = fn;\n\n element.addEventListener(typeEvent, fn, delegation);\n}\n\nfunction removeHandler(element, events, typeEvent, handler, delegationSelector) {\n const fn = findHandler(events[typeEvent], handler, delegationSelector);\n\n if (!fn) {\n return;\n }\n\n element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));\n delete events[typeEvent][fn.uidEvent];\n}\n\nfunction removeNamespacedHandlers(element, events, typeEvent, namespace) {\n const storeElementEvent = events[typeEvent] || {};\n\n Object.keys(storeElementEvent).forEach((handlerKey) => {\n if (handlerKey.indexOf(namespace) > -1) {\n const event = storeElementEvent[handlerKey];\n\n removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);\n }\n });\n}\n\nconst EventHandler = {\n on(element, event, handler, delegationFn) {\n addHandler(element, event, handler, delegationFn, false);\n },\n\n one(element, event, handler, delegationFn) {\n addHandler(element, event, handler, delegationFn, true);\n },\n\n off(element, originalTypeEvent, handler, delegationFn) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return;\n }\n\n const [delegation, originalHandler, typeEvent] = normalizeParams(\n originalTypeEvent,\n handler,\n delegationFn\n );\n const inNamespace = typeEvent !== originalTypeEvent;\n const events = getEvent(element);\n const isNamespace = originalTypeEvent.charAt(0) === '.';\n\n if (typeof originalHandler !== 'undefined') {\n // Simplest case: handler is passed, remove that listener ONLY.\n if (!events || !events[typeEvent]) {\n return;\n }\n\n removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null);\n return;\n }\n\n if (isNamespace) {\n Object.keys(events).forEach((elementEvent) => {\n removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));\n });\n }\n\n const storeElementEvent = events[typeEvent] || {};\n Object.keys(storeElementEvent).forEach((keyHandlers) => {\n const handlerKey = keyHandlers.replace(stripUidRegex, '');\n\n if (!inNamespace || originalTypeEvent.indexOf(handlerKey) > -1) {\n const event = storeElementEvent[keyHandlers];\n\n removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);\n }\n });\n },\n\n trigger(element, event, args) {\n if (typeof event !== 'string' || !element) {\n return null;\n }\n\n const typeEvent = event.replace(stripNameRegex, '');\n const inNamespace = event !== typeEvent;\n const isNative = nativeEvents.indexOf(typeEvent) > -1;\n\n let jQueryEvent;\n let bubbles = true;\n let nativeDispatch = true;\n let defaultPrevented = false;\n let evt = null;\n\n if (inNamespace && $) {\n jQueryEvent = $.Event(event, args);\n\n $(element).trigger(jQueryEvent);\n bubbles = !jQueryEvent.isPropagationStopped();\n nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();\n defaultPrevented = jQueryEvent.isDefaultPrevented();\n }\n\n if (isNative) {\n evt = document.createEvent('HTMLEvents');\n evt.initEvent(typeEvent, bubbles, true);\n } else {\n evt = new CustomEvent(event, {\n bubbles,\n cancelable: true,\n });\n }\n\n // merge custom informations in our event\n if (typeof args !== 'undefined') {\n Object.keys(args).forEach((key) => {\n Object.defineProperty(evt, key, {\n get() {\n return args[key];\n },\n });\n });\n }\n\n if (defaultPrevented) {\n evt.preventDefault();\n\n if (!defaultPreventedPreservedOnDispatch) {\n Object.defineProperty(evt, 'defaultPrevented', {\n get: () => true,\n });\n }\n }\n\n if (nativeDispatch) {\n element.dispatchEvent(evt);\n }\n\n if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') {\n jQueryEvent.preventDefault();\n }\n\n return evt;\n },\n};\n\nexport const EventHandlerMulti = {\n on(element, eventsName, handler, delegationFn) {\n const events = eventsName.split(' ');\n\n for (let i = 0; i < events.length; i++) {\n EventHandler.on(element, events[i], handler, delegationFn);\n }\n },\n off(element, originalTypeEvent, handler, delegationFn) {\n const events = originalTypeEvent.split(' ');\n\n for (let i = 0; i < events.length; i++) {\n EventHandler.off(element, events[i], handler, delegationFn);\n }\n },\n};\n\nexport default EventHandler;\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-alpha1): dom/selector-engine.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { find as findFn, findOne } from './polyfill';\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NODE_TEXT = 3;\n\nconst SelectorEngine = {\n closest(element, selector) {\n return element.closest(selector);\n },\n\n matches(element, selector) {\n return element.matches(selector);\n },\n\n find(selector, element = document.documentElement) {\n return [].concat(...findFn.call(element, selector));\n },\n\n findOne(selector, element = document.documentElement) {\n return findOne.call(element, selector);\n },\n\n children(element, selector) {\n const children = [].concat(...element.children);\n\n return children.filter((child) => child.matches(selector));\n },\n\n parents(element, selector) {\n const parents = [];\n\n let ancestor = element.parentNode;\n\n while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {\n if (this.matches(ancestor, selector)) {\n parents.push(ancestor);\n }\n\n ancestor = ancestor.parentNode;\n }\n\n return parents;\n },\n\n prev(element, selector) {\n let previous = element.previousElementSibling;\n\n while (previous) {\n if (previous.matches(selector)) {\n return [previous];\n }\n\n previous = previous.previousElementSibling;\n }\n\n return [];\n },\n\n next(element, selector) {\n let next = element.nextElementSibling;\n\n while (next) {\n if (this.matches(next, selector)) {\n return [next];\n }\n\n next = next.nextElementSibling;\n }\n\n return [];\n },\n};\n\nexport default SelectorEngine;\n","const create = {\n textarea: (textareaName, UUID) => {\n const name = textareaName || `wysiwyg-textarea-${UUID}`;\n return ``;\n },\n contentDiv: () => {\n return '
';\n },\n toolBar: (options) => {\n const {\n wysiwygTranslations,\n wysiwygColors,\n wysiwygStylesSection,\n wysiwygFormattingSection,\n wysiwygJustifySection,\n wysiwygListsSection,\n wysiwygLinksSection,\n wysiwygShowCodeSection,\n wysiwygUndoRedoSection,\n wysiwygFixed,\n wysiwygFixedOffsetTop,\n } = options;\n const translation = wysiwygTranslations;\n\n return ` `;\n },\n stylesSection: (translations) => {\n const { textStyle, paragraph, heading, preformatted } = translations;\n return `\n \n `;\n },\n formattingSection: (translations, colors) => {\n const { bold, italic, underline, strikethrough, textcolor, textBackgroundColor } = translations;\n return `\n \n `;\n },\n textColorPalette: (colors, cmd) => {\n let result = '';\n\n colors.forEach((color) => {\n result += ``;\n });\n\n return result;\n },\n justifySection: (translations) => {\n const { alignCenter, alignLeft, alignRight, alignJustify } = translations;\n return `\n \n `;\n },\n listsSection: (translations) => {\n const { unorderedList, orderedList, decreaseIndent, increaseIndent } = translations;\n return `\n \n `;\n },\n linksSection: (translations) => {\n const {\n insertLink,\n addLinkHead,\n linkUrlLabel,\n linkDescription,\n okButton,\n cancelButton,\n insertPicture,\n addImageHead,\n imageUrlLabel,\n insertHorizontalRule,\n } = translations;\n return `\n