{"version":3,"file":"trix-customizations.js","sources":["../../../javascript/admin/trix-customizations.js"],"sourcesContent":["import Trix from \"trix\";\n\n/* Define an own style: */\n// Trix.config.textAttributes.red = { style: { color: \"red\" }, inheritable: true }\n\n/* Define own tags: */\nTrix.config.blockAttributes.heading1.tagName = 'h1';\nTrix.config.blockAttributes.heading2 = { tagName: 'h2' }\nTrix.config.blockAttributes.heading3 = { tagName: 'h3' }\n\n/* insert the button visual in the default toolbar */\naddEventListener(\"trix-initialize\", function(event) {\n const toolbarElement = event.target.toolbarElement\n\n const h1 = toolbarElement.querySelector('[data-trix-attribute=heading1]')\n h1.innerHTML = 'H1'\n h1.insertAdjacentHTML(\n 'afterend',\n '' +\n ''\n )\n\n const blockTools = toolbarElement.querySelector(\"[data-trix-button-group=block-tools]\")\n blockTools.insertAdjacentHTML(\"afterbegin\", `\n \n `)\n})\n\naddEventListener(\"trix-action-invoke\", event => {\n if (event.actionName == \"x-horizontal-rule\") {\n const { editor } = event.target\n const attachment = new Trix.Attachment({ content: \"