sprintify-ui 0.12.4 → 0.12.5
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.
- package/dist/sprintify-ui.es.js +1137 -1133
- package/package.json +1 -1
- package/src/components/BaseTipTap.vue +17 -2
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
noMargin ? 'tip-tap-no-margin' : ''
|
|
7
7
|
]"
|
|
8
8
|
>
|
|
9
|
-
<div class="px-1 py-1 border-b flex items-center">
|
|
9
|
+
<div class="px-1 py-1 border-b flex flex-wrap items-center">
|
|
10
10
|
<template
|
|
11
11
|
v-for="action in filteredActions"
|
|
12
12
|
:key="action.name"
|
|
@@ -126,7 +126,8 @@
|
|
|
126
126
|
|
|
127
127
|
<div
|
|
128
128
|
class="bg-white p-5"
|
|
129
|
-
:class="[disabled ? 'cursor-not-allowed opacity-80' : '']"
|
|
129
|
+
:class="[disabled ? 'cursor-not-allowed opacity-80' : 'cursor-text']"
|
|
130
|
+
@click="focusEditor"
|
|
130
131
|
>
|
|
131
132
|
<editor-content
|
|
132
133
|
v-if="editor"
|
|
@@ -271,6 +272,20 @@ function pickImage() {
|
|
|
271
272
|
imageInput.value?.click();
|
|
272
273
|
}
|
|
273
274
|
|
|
275
|
+
function focusEditor(event: MouseEvent) {
|
|
276
|
+
if (props.disabled || !editor) {
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
const target = event.target as HTMLElement;
|
|
281
|
+
|
|
282
|
+
if (target.closest('.ProseMirror')) {
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
editor.chain().focus('end').run();
|
|
287
|
+
}
|
|
288
|
+
|
|
274
289
|
const highlightColors = [
|
|
275
290
|
'#BBF7D0',
|
|
276
291
|
'#BFDBFE',
|