@dialpad/dialtone
Version:
Dialpad's Dialtone design system monorepo
852 lines (851 loc) • 28 kB
JavaScript
import { EDITOR_SUPPORTED_LINK_PROTOCOLS as J, EDITOR_DEFAULT_LINK_PREFIX as H } from "./editor-constants.js";
import { removeClassStyleAttrs as X, addClassStyleAttrs as Y } from "../../common/utils/index.js";
import { DtIconQuickReply as T, DtIconBold as b, DtIconItalic as x, DtIconUnderline as C, DtIconStrikethrough as _, DtIconListBullet as R, DtIconListOrdered as E, DtIconAlignLeft as v, DtIconAlignCenter as F, DtIconAlignRight as S, DtIconAlignJustify as O, DtIconQuote as D, DtIconCodeBlock as Q, DtIconLink2 as M, DtIconImage as q } from "@dialpad/dialtone-icons/vue3";
import { resolveComponent as h, openBlock as a, createElementBlock as I, mergeProps as V, createVNode as c, withCtx as u, Fragment as U, renderList as P, createBlock as p, withKeys as k, withModifiers as f, resolveDynamicComponent as K, createTextVNode as w, toDisplayString as g, createElementVNode as L, createCommentVNode as j, normalizeStyle as W } from "vue";
import { _ as Z } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
import $ from "../rich-text-editor/rich-text-editor.js";
import tt from "../button/button.js";
import et from "../popover/popover.js";
import it from "../stack/stack.js";
import ot from "../input/input.js";
import nt from "../tooltip/tooltip.js";
import { RICH_TEXT_EDITOR_AUTOFOCUS_TYPES as rt, RICH_TEXT_EDITOR_OUTPUT_FORMATS as lt } from "../rich-text-editor/rich-text-editor-constants.js";
const st = {
compatConfig: { MODE: 3 },
name: "DtRecipeEditor",
components: {
DtRichTextEditor: $,
DtButton: tt,
DtPopover: et,
DtStack: it,
DtInput: ot,
DtTooltip: nt,
DtIconQuickReply: T,
DtIconBold: b,
DtIconItalic: x,
DtIconUnderline: C,
DtIconStrikethrough: _,
DtIconListBullet: R,
DtIconListOrdered: E,
DtIconAlignLeft: v,
DtIconAlignCenter: F,
DtIconAlignRight: S,
DtIconAlignJustify: O,
DtIconQuote: D,
DtIconCodeBlock: Q,
DtIconLink2: M,
DtIconImage: q
},
mixins: [],
inheritAttrs: !1,
props: {
/**
* Value of the input. The object format should match TipTap's JSON
* document structure: https://tiptap.dev/guide/output#option-1-json
*/
modelValue: {
type: [Object, String],
default: ""
},
/**
* Whether the input is editable
*/
editable: {
type: Boolean,
default: !0
},
/**
* Descriptive label for the input element
*/
inputAriaLabel: {
type: String,
required: !0,
default: ""
},
/**
* Additional class name for the input element. Only accepts a String value
* because this is passed to the editor via options. For multiple classes,
* join them into one string, e.g. "d-p8 d-hmx96"
*/
inputClass: {
type: String,
default: ""
},
/**
* Whether the input should receive focus after the component has been
* mounted. Either one of `start`, `end`, `all` or a Boolean or a Number.
* - `start` Sets the focus to the beginning of the input
* - `end` Sets the focus to the end of the input
* - `all` Selects the whole contents of the input
* - `Number` Sets the focus to a specific position in the input
* - `true` Defaults to `start`
* - `false` Disables autofocus
* @values true, false, start, end, all, number
*/
autoFocus: {
type: [Boolean, String, Number],
default: !1,
validator(t) {
return typeof t == "string" ? rt.includes(t) : !0;
}
},
/**
* Placeholder text
*/
placeholder: {
type: String,
default: ""
},
/**
* Content area needs to dynamically adjust height based on the conversation area height.
* can be vh|px|rem|em|%
*/
maxHeight: {
type: String,
default: "unset"
},
/**
* Confirm set link button defaults.
*/
confirmSetLinkButton: {
type: Object,
default: () => ({ label: "Confirm", ariaLabel: "Confirm set link" })
},
/**
* Remove link button defaults.
*/
removeLinkButton: {
type: Object,
default: () => ({ label: "Remove", ariaLabel: "Remove link" })
},
/**
* Cancel set link button defaults.
*/
cancelSetLinkButton: {
type: Object,
default: () => ({ label: "Cancel", ariaLabel: "Cancel set link" })
},
/**
* Placeholder text for the set link input field
*/
setLinkPlaceholder: {
type: String,
default: ""
},
/**
* Show button to render text as bold
*/
showBoldButton: {
type: Boolean,
default: !0
},
/**
* Show button to render text in italics
*/
showItalicsButton: {
type: Boolean,
default: !0
},
/**
* Show button to underline text
*/
showUnderlineButton: {
type: Boolean,
default: !0
},
/**
* Show button to strike text
*/
showStrikeButton: {
type: Boolean,
default: !0
},
/**
* Show button to render list items
*/
showListItemsButton: {
type: Boolean,
default: !0
},
/**
* Show button to render ordered list items
*/
showOrderedListButton: {
type: Boolean,
default: !0
},
/**
* Show button to align text to the left
*/
showAlignLeftButton: {
type: Boolean,
default: !0
},
/**
* Show button to align text to the center
*/
showAlignCenterButton: {
type: Boolean,
default: !0
},
/**
* Show button to align text to the right
*/
showAlignRightButton: {
type: Boolean,
default: !0
},
/**
* Show button to justify text
*/
showAlignJustifyButton: {
type: Boolean,
default: !0
},
/**
* Show button to add quote format to text
*/
showQuoteButton: {
type: Boolean,
default: !0
},
/**
* Show button to add code block
*/
showCodeBlockButton: {
type: Boolean,
default: !0
},
/**
* Show button to handle quick replies
*/
showQuickRepliesButton: {
type: Boolean,
default: !0
},
/**
* Show button to add an inline image
*/
showInlineImageButton: {
type: Boolean,
default: !1
},
/**
* Show add link default config.
*/
showAddLink: {
type: Object,
default: () => ({
showAddLinkButton: !0,
setLinkTitle: "Add a link",
setLinkInputAriaLabel: "Input field to add link"
})
},
/**
* Use div tags instead of paragraph tags to show text
*/
useDivTags: {
type: Boolean,
default: !1
}
},
emits: [
/**
* Native focus event
* @event input
* @type {String|JSON}
*/
"focus",
/**
* Native blur event
* @event input
* @type {String|JSON}
*/
"blur",
/**
* Native input event
* @event input
* @type {String|JSON}
*/
"input",
/**
* Event fired to sync the modelValue prop with the parent component
* @event input
* @type {String|JSON}
*/
"update:modelValue",
/**
* Quick replies button
* pressed event
* @event quick-replies-click
*/
"quick-replies-click",
/**
* Emit when inline image button is clicked
* @event inline-image-click
*/
"inline-image-click",
/**
* Emit when text input is changed
* @event text-input
* @type {String}
*/
"text-input"
],
data() {
return {
internalInputValue: this.modelValue,
// internal input content
hasFocus: !1,
linkOptions: {
class: "d-recipe-editor__link"
},
showLinkInput: !1,
linkInput: "",
currentButtonRefIndex: 0
};
},
computed: {
inputLength() {
return this.internalInputValue.length;
},
htmlOutputFormat() {
return lt[2];
},
showingTextFormatButtons() {
return this.showBoldButton || this.showItalicsButton || this.showStrikeButton || this.showUnderlineButton;
},
showingAlignmentButtons() {
return this.showAlignLeftButton || this.showAlignCenterButton || this.showAlignRightButton || this.showAlignJustifyButton;
},
showingListButtons() {
return this.showListItemsButton || this.showOrderedListButton;
},
orderedRefs() {
const t = this.buttonGroups.reduce((function(e, o) {
return o.buttonGroup.forEach((n) => {
e.push(this.getButtonRef(o.key, n.selector));
}, this), e;
}).bind(this), []);
return t.push(this.getButtonRef("custom", "link")), t;
},
buttonGroups() {
const t = this.individualButtons.map((e) => ({
key: e.selector,
buttonGroup: [e]
}));
return [
{ key: "new", buttonGroup: this.newButtons },
{ key: "format", buttonGroup: this.textFormatButtons },
{ key: "alignment", buttonGroup: this.alignmentButtons },
{ key: "list", buttonGroup: this.listButtons },
...t
].filter((e) => e.buttonGroup.length > 0);
},
newButtons() {
return [
{
showBtn: this.showQuickRepliesButton,
label: "Quick reply",
selector: "quickReplies",
icon: T,
dataQA: "dt-recipe-editor-quick-replies-btn",
tooltipMessage: "Quick Reply",
onClick: this.onQuickRepliesClick
}
].filter((t) => t.showBtn);
},
textFormatButtons() {
return [
{
showBtn: this.showBoldButton,
selector: "bold",
icon: b,
dataQA: "dt-recipe-editor-bold-btn",
tooltipMessage: "Bold",
onClick: this.onBoldTextToggle
},
{
showBtn: this.showItalicsButton,
selector: "italic",
icon: x,
dataQA: "dt-recipe-editor-italics-btn",
tooltipMessage: "Italics",
onClick: this.onItalicTextToggle
},
{
showBtn: this.showUnderlineButton,
selector: "underline",
icon: C,
dataQA: "dt-recipe-editor-underline-btn",
tooltipMessage: "Underline",
onClick: this.onUnderlineTextToggle
},
{
showBtn: this.showStrikeButton,
selector: "strike",
icon: _,
dataQA: "dt-recipe-editor-strike-btn",
tooltipMessage: "Strike",
onClick: this.onStrikethroughTextToggle
}
].filter((t) => t.showBtn);
},
alignmentButtons() {
return [
{
showBtn: this.showAlignLeftButton,
selector: { textAlign: "left" },
icon: v,
dataQA: "dt-recipe-editor-align-left-btn",
tooltipMessage: "Align Left",
onClick: () => this.onTextAlign("left")
},
{
showBtn: this.showAlignCenterButton,
selector: { textAlign: "center" },
icon: F,
dataQA: "dt-recipe-editor-align-center-btn",
tooltipMessage: "Align Center",
onClick: () => this.onTextAlign("center")
},
{
showBtn: this.showAlignRightButton,
selector: { textAlign: "right" },
icon: S,
dataQA: "dt-recipe-editor-align-right-btn",
tooltipMessage: "Align Right",
onClick: () => this.onTextAlign("right")
},
{
showBtn: this.showAlignJustifyButton,
selector: { textAlign: "justify" },
icon: O,
dataQA: "dt-recipe-editor-align-justify-btn",
tooltipMessage: "Align Justify",
onClick: () => this.onTextAlign("justify")
}
].filter((t) => t.showBtn);
},
listButtons() {
return [
{
showBtn: this.showListItemsButton,
selector: "bulletList",
icon: R,
dataQA: "dt-recipe-editor-list-items-btn",
tooltipMessage: "Bullet List",
onClick: this.onBulletListToggle
},
{
showBtn: this.showOrderedListButton,
selector: "orderedList",
icon: E,
dataQA: "dt-recipe-editor-ordered-list-items-btn",
tooltipMessage: "Ordered List",
onClick: this.onOrderedListToggle
}
].filter((t) => t.showBtn);
},
individualButtons() {
return [
{
showBtn: this.showQuoteButton,
selector: "blockquote",
icon: D,
dataQA: "dt-recipe-editor-blockquote-btn",
tooltipMessage: "Quote",
onClick: this.onBlockquoteToggle
},
{
showBtn: this.showCodeBlockButton,
selector: "codeBlock",
icon: Q,
dataQA: "dt-recipe-editor-code-block-btn",
tooltipMessage: "Code",
onClick: this.onCodeBlockToggle
},
{
showBtn: this.showInlineImageButton,
selector: "image",
icon: q,
dataQA: "dt-recipe-editor-inline-image-btn",
tooltipMessage: "Image",
// Handle getting image
onClick: this.onInsertInlineImageClick
}
].filter((t) => t.showBtn);
},
linkButton() {
return {
showBtn: this.showAddLink.showAddLinkButton,
selector: "link",
icon: M,
dataQA: "dt-recipe-editor-add-link-btn",
tooltipMessage: "Link",
onClick: this.openLinkInput
};
}
},
watch: {
modelValue(t) {
this.internalInputValue = t;
}
},
methods: {
removeClassStyleAttrs: X,
addClassStyleAttrs: Y,
onInputFocus(t) {
t == null || t.stopPropagation();
},
removeLink() {
var t, e, o, n, r;
(r = (n = (o = (e = (t = this.$refs.richTextEditor) == null ? void 0 : t.editor) == null ? void 0 : e.chain()) == null ? void 0 : o.focus()) == null ? void 0 : n.unsetLink()) == null || r.run(), this.closeLinkInput();
},
setLink(t) {
var r, i, d;
const e = (r = this.$refs.richTextEditor) == null ? void 0 : r.editor;
if (t == null || t.preventDefault(), t == null || t.stopPropagation(), !this.linkInput) {
this.removeLink();
return;
}
J.find((B) => B.test(this.linkInput)) || (this.linkInput = `${H}${this.linkInput}`);
const n = (d = (i = e == null ? void 0 : e.view) == null ? void 0 : i.state) == null ? void 0 : d.selection;
n.anchor === n.head ? e.chain().focus().insertContentAt(
n.anchor,
`<a class="${this.linkOptions.class}" href=${this.linkInput}>${this.linkInput}</a>`
).run() : e.chain().focus().extendMarkRange("link").setLink({ href: this.linkInput, class: this.linkOptions.class }).run(), this.closeLinkInput();
},
openLinkInput() {
this.showLinkInput = !0;
},
updateInput(t) {
var e, o, n;
if (!t)
return this.closeLinkInput();
this.linkInput = (n = (o = (e = this.$refs.richTextEditor) == null ? void 0 : e.editor) == null ? void 0 : o.getAttributes("link")) == null ? void 0 : n.href;
},
closeLinkInput() {
var t;
this.showLinkInput = !1, this.linkInput = "", (t = this.$refs.richTextEditor.editor) == null || t.chain().focus();
},
onBoldTextToggle() {
var t, e;
(e = (t = this.$refs.richTextEditor) == null ? void 0 : t.editor) == null || e.chain().focus().toggleBold().run();
},
onItalicTextToggle() {
var t;
(t = this.$refs.richTextEditor) == null || t.editor.chain().focus().toggleItalic().run();
},
onUnderlineTextToggle() {
var t;
(t = this.$refs.richTextEditor) == null || t.editor.chain().focus().toggleUnderline().run();
},
onStrikethroughTextToggle() {
var t;
(t = this.$refs.richTextEditor) == null || t.editor.chain().focus().toggleStrike().run();
},
onTextAlign(t) {
var e, o, n, r;
if ((o = (e = this.$refs.richTextEditor) == null ? void 0 : e.editor) != null && o.isActive({ textAlign: t }))
return (n = this.$refs.richTextEditor) == null ? void 0 : n.editor.chain().focus().unsetTextAlign().run();
(r = this.$refs.richTextEditor) == null || r.editor.chain().focus().setTextAlign(t).run();
},
onBulletListToggle() {
var t;
(t = this.$refs.richTextEditor) == null || t.editor.chain().focus().toggleBulletList().run();
},
onOrderedListToggle() {
var t;
(t = this.$refs.richTextEditor) == null || t.editor.chain().focus().toggleOrderedList().run();
},
onCodeBlockToggle() {
var t;
(t = this.$refs.richTextEditor) == null || t.editor.chain().focus().toggleCodeBlock().run();
},
onQuickRepliesClick() {
this.$emit("quick-replies-click");
},
onInsertInlineImageClick() {
this.$emit("inline-image-click");
},
insertInlineImage(t) {
var e;
(e = this.$refs.richTextEditor) == null || e.editor.chain().focus().setImage({ src: t }).run();
},
insertInMessageBody(t) {
var e;
(e = this.$refs.richTextEditor) == null || e.editor.chain().focus().insertContent(t).run();
},
setCursorPosition(t = null) {
var e;
(e = this.$refs.richTextEditor) == null || e.editor.chain().focus(t).run();
},
onBlockquoteToggle() {
var t;
(t = this.$refs.richTextEditor) == null || t.editor.chain().focus().toggleBlockquote().run();
},
onTextInput(t) {
this.$emit("text-input", t);
},
onFocus(t) {
this.hasFocus = !0, this.$emit("focus", t);
},
onBlur(t) {
this.hasFocus = !1, this.$emit("blur", t);
},
onInput(t) {
this.$emit("input", t), this.$emit("update:modelValue", t);
},
getButtonKey(t, e) {
return `${t}-${JSON.stringify(e)}`;
},
// Unique Button Ref Key to identify ref
getButtonRef(t, e) {
return `${this.getButtonKey(t, e)}-ref`;
},
/**
* Determines if an element in the action bar button list is focusable with tab key
* @param {string} refKey - unique identifier for the ref element in DOM
*/
canFocus(t) {
return t === this.orderedRefs[this.currentButtonRefIndex];
},
shiftActionBarFocusRight() {
this.shiftButtonRefIndex(1);
},
shiftActionBarFocusLeft() {
this.shiftButtonRefIndex(-1);
},
shiftButtonRefIndex(t) {
const e = this.$refs[this.orderedRefs[this.currentButtonRefIndex]], o = Array.isArray(e) ? e[0] : e, n = (this.currentButtonRefIndex + t) % this.orderedRefs.length;
this.currentButtonRefIndex = n >= 0 ? n : this.orderedRefs.length + n;
const r = this.$refs[this.orderedRefs[this.currentButtonRefIndex]], i = Array.isArray(r) ? r[0] : r;
o.$el.blur(), i.$el.focus();
}
}
}, ut = /* @__PURE__ */ L("div", { class: "d-recipe-editor__button-group-divider" }, null, -1), at = { class: "d-recipe-editor__popover-content" }, ct = { key: 0 };
function dt(t, e, o, n, r, i) {
const d = h("dt-button"), B = h("dt-tooltip"), m = h("dt-stack"), z = h("dt-input"), N = h("dt-popover"), G = h("dt-rich-text-editor");
return a(), I("div", V({ class: "d-recipe-editor" }, i.addClassStyleAttrs(t.$attrs), {
"data-qa": "dt-recipe-editor",
role: "presentation",
onClick: e[4] || (e[4] = (l) => t.$refs.richTextEditor.focusEditor())
}), [
c(m, {
class: "d-recipe-editor__top-bar",
direction: "row",
gap: "450"
}, {
default: u(() => [
(a(!0), I(U, null, P(i.buttonGroups, (l) => (a(), p(m, {
key: l.key,
direction: "row",
gap: "300"
}, {
default: u(() => [
(a(!0), I(U, null, P(l.buttonGroup, (s) => (a(), p(B, {
key: i.getButtonKey(l.key, s.selector),
message: s.tooltipMessage,
placement: "top"
}, {
anchor: u(() => {
var A, y;
return [
c(d, {
ref_for: !0,
ref: i.getButtonRef(l.key, s.selector),
active: (y = (A = t.$refs.richTextEditor) == null ? void 0 : A.editor) == null ? void 0 : y.isActive(s.selector),
"aria-label": s.tooltipMessage,
"data-qa": s.dataQA,
tabindex: i.canFocus(i.getButtonRef(l.key, s.selector)) ? 0 : -1,
importance: "clear",
kind: "muted",
size: "xs",
onClick: (ht) => s.onClick(),
onKeydown: [
k(f(i.shiftActionBarFocusRight, ["stop"]), ["right"]),
k(f(i.shiftActionBarFocusLeft, ["stop"]), ["left"])
]
}, {
icon: u(() => [
(a(), p(K(s.icon), { size: "200" }))
]),
default: u(() => [
w(" " + g(s == null ? void 0 : s.label), 1)
]),
_: 2
}, 1032, ["active", "aria-label", "data-qa", "tabindex", "onClick", "onKeydown"])
];
}),
_: 2
}, 1032, ["message"]))), 128)),
ut
]),
_: 2
}, 1024))), 128)),
i.linkButton.showBtn ? (a(), p(m, {
key: 0,
direction: "row",
gap: "300"
}, {
default: u(() => [
c(N, {
open: r.showLinkInput,
"show-close-button": !1,
"visually-hidden-close": !0,
"visually-hidden-close-label": "Close link input popover",
"data-qa": "dt-recipe-editor-link-input-popover",
padding: "none",
placement: "bottom-start",
onClick: [
i.onInputFocus,
f(i.onInputFocus, ["stop"])
],
onOpened: i.updateInput
}, {
anchor: u(() => [
(a(), p(B, {
key: i.linkButton.key,
message: i.linkButton.tooltipMessage,
placement: "top"
}, {
anchor: u(() => {
var l, s;
return [
c(d, {
ref: i.getButtonRef("custom", "link"),
active: (s = (l = t.$refs.richTextEditor) == null ? void 0 : l.editor) == null ? void 0 : s.isActive(i.linkButton.selector),
"aria-label": i.linkButton.tooltipMessage,
"data-qa": i.linkButton.dataQA,
tabindex: i.canFocus(i.getButtonRef("custom", "link")) ? 0 : -1,
importance: "clear",
kind: "muted",
size: "xs",
onClick: e[0] || (e[0] = (A) => i.linkButton.onClick()),
onKeydown: [
k(f(i.shiftActionBarFocusRight, ["stop"]), ["right"]),
k(f(i.shiftActionBarFocusLeft, ["stop"]), ["left"])
]
}, {
icon: u(() => [
(a(), p(K(i.linkButton.icon), { size: "200" }))
]),
_: 1
}, 8, ["active", "aria-label", "data-qa", "tabindex", "onKeydown"])
];
}),
_: 1
}, 8, ["message"]))
]),
content: u(() => [
L("div", at, [
o.showAddLink.setLinkTitle.length > 0 ? (a(), I("span", ct, g(o.showAddLink.setLinkTitle), 1)) : j("", !0),
c(z, {
modelValue: r.linkInput,
"onUpdate:modelValue": e[1] || (e[1] = (l) => r.linkInput = l),
"input-aria-label": o.showAddLink.setLinkInputAriaLabel,
placeholder: o.setLinkPlaceholder,
"data-qa": "dt-recipe-editor-link-input",
"input-wrapper-class": "d-recipe-editor-link__input-wrapper",
onClick: [
i.onInputFocus,
f(i.onInputFocus, ["stop"])
],
onFocus: i.onInputFocus,
onKeydown: k(i.setLink, ["enter"])
}, null, 8, ["modelValue", "input-aria-label", "placeholder", "onClick", "onFocus", "onKeydown"])
])
]),
footerContent: u(() => [
c(m, {
direction: "row",
gap: "300",
class: "d-recipe-editor__popover-footer"
}, {
default: u(() => [
c(d, {
"aria-label": o.removeLinkButton.ariaLabel,
"data-qa": "dt-recipe-editor-remove-link-btn",
importance: "clear",
kind: "muted",
size: "sm",
onClick: i.removeLink
}, {
default: u(() => [
w(g(o.removeLinkButton.label), 1)
]),
_: 1
}, 8, ["aria-label", "onClick"]),
c(d, {
"aria-label": o.cancelSetLinkButton.ariaLabel,
"data-qa": "dt-recipe-editor-set-link-cancel-btn",
importance: "clear",
kind: "muted",
size: "sm",
onClick: i.closeLinkInput
}, {
default: u(() => [
w(g(o.cancelSetLinkButton.label), 1)
]),
_: 1
}, 8, ["aria-label", "onClick"]),
c(d, {
"aria-label": o.confirmSetLinkButton.ariaLabel,
"data-qa": "dt-recipe-editor-set-link-confirm-btn",
size: "sm",
onClick: i.setLink
}, {
default: u(() => [
w(g(o.confirmSetLinkButton.label), 1)
]),
_: 1
}, 8, ["aria-label", "onClick"])
]),
_: 1
})
]),
_: 1
}, 8, ["open", "onClick", "onOpened"])
]),
_: 1
})) : j("", !0)
]),
_: 1
}),
L("div", {
style: W({ "max-height": o.maxHeight }),
class: "d-recipe-editor__content"
}, [
c(G, V({
ref: "richTextEditor",
modelValue: r.internalInputValue,
"onUpdate:modelValue": e[2] || (e[2] = (l) => r.internalInputValue = l),
"allow-font-color": !0,
"allow-font-family": !0,
"allow-inline-images": !0,
"allow-line-breaks": !0,
"hide-link-bubble-menu": !0,
"auto-focus": o.autoFocus,
editable: o.editable,
"input-aria-label": o.inputAriaLabel,
"input-class": `d-recipe-editor__content-input ${o.inputClass}`,
link: !0,
"output-format": i.htmlOutputFormat,
placeholder: o.placeholder,
"use-div-tags": o.useDivTags,
"data-qa": "dt-rich-text-editor"
}, i.removeClassStyleAttrs(t.$attrs), {
onTextInput: i.onTextInput,
onBlur: i.onBlur,
onFocus: i.onFocus,
onInput: e[3] || (e[3] = (l) => i.onInput(l))
}), null, 16, ["modelValue", "auto-focus", "editable", "input-aria-label", "input-class", "output-format", "placeholder", "use-div-tags", "onTextInput", "onBlur", "onFocus"])
], 4)
], 16);
}
const bt = /* @__PURE__ */ Z(st, [["render", dt]]);
export {
bt as default
};
//# sourceMappingURL=editor.js.map