diff --git a/src/components/base/EditorToolbar.vue b/src/components/base/EditorToolbar.vue
index 5b9436c87..a7dd78d74 100644
--- a/src/components/base/EditorToolbar.vue
+++ b/src/components/base/EditorToolbar.vue
@@ -7,7 +7,7 @@
:class="{ 'is-active': editor.isActive('heading', { level: 1 }) }"
title="h1"
>
- 1
+ 1
- 2
+ 2
- 3
+ 3
- 4
+ 4
- 5
+ 5
- 6
+ 6
@@ -59,7 +59,7 @@
title="bold"
>
-
+
-
+
-
+
@@ -92,7 +92,7 @@
title="code"
>
-
+
-
+
-
+
@@ -125,7 +125,7 @@
title="bullet list"
>
-
+
-
+
-
+
@@ -153,7 +153,7 @@
-
+
@@ -181,7 +181,7 @@
title="set link"
>
-
+
-
+
-
+
@@ -218,7 +218,7 @@
@click="editor.chain().focus().setHardBreak().run()"
>
-
+
@@ -230,7 +230,7 @@
title="undo"
>
-
+
-
+
@@ -253,7 +253,7 @@
title="table"
>
-
+
@@ -399,28 +399,28 @@ function toggleTableMode() {
}
function addImage() {
-
+
if (typeof uploadCallback !== 'undefined') {
const files = uploadInputRef.value?.files
if (!files || files.length === 0) {
return
}
-
+
uploadCallback(files).then(urls => {
urls.forEach(url => {
- editor?.chain().focus().setImage({ src: url }).run()
+ editor?.chain().focus().setImage({src: url}).run()
})
emit('imageAdded')
})
return
}
-
+
const url = window.prompt('URL')
if (url) {
- editor?.chain().focus().setImage({ src: url }).run()
+ editor?.chain().focus().setImage({src: url}).run()
emit('imageAdded')
}
}
@@ -446,7 +446,7 @@ function setLink() {
.chain()
.focus()
.extendMarkRange('link')
- .setLink({ href: url, target: '_blank' })
+ .setLink({href: url, target: '_blank'})
.run()
}
diff --git a/src/components/base/TipTap.vue b/src/components/base/TipTap.vue
index 9b4ef2333..9224cbac9 100644
--- a/src/components/base/TipTap.vue
+++ b/src/components/base/TipTap.vue
@@ -1,14 +1,14 @@
-
-
@@ -102,7 +102,7 @@ watch(
if (modelValue === '') {
return
}
-
+
if (!modelValue.startsWith(TIPTAP_TEXT_VALUE_PREFIX)) {
// convert Markdown to HTML
inputHTML.value = TIPTAP_TEXT_VALUE_PREFIX + marked.parse(modelValue)
@@ -113,7 +113,7 @@ watch(
inputHTML.value = modelValue.replace(tiptapRegex, '')
nextTick(() => loadImages())
},
- { immediate: true },
+ {immediate: true},
)
function onImageAdded() {
@@ -123,6 +123,7 @@ function onImageAdded() {
type CacheKey = `${ITask['id']}-${IAttachment['id']}`
const loadedAttachments = ref<{ [key: CacheKey]: string }>({})
+
function loadImages() {
const attachmentImage = document.querySelectorAll
('.tiptap__editor img')
const attachmentService = new AttachmentService()
@@ -246,7 +247,7 @@ onBeforeUnmount(() => editor.value?.destroy())
/* Basic editor styles */
.ProseMirror {
padding: .5rem;
-
+
> * + * {
margin-top: 0.75em;
}
@@ -277,7 +278,7 @@ onBeforeUnmount(() => editor.value?.destroy())
pre {
background: #0d0d0d;
color: #fff;
- font-family: "JetBrainsMono", monospace;
+ font-family: 'JetBrainsMono', monospace;
padding: 0.75rem 1rem;
border-radius: 0.5rem;
@@ -292,7 +293,7 @@ onBeforeUnmount(() => editor.value?.destroy())
pre {
background: #0d0d0d;
color: #fff;
- font-family: "JetBrainsMono", monospace;
+ font-family: 'JetBrainsMono', monospace;
padding: 0.75rem 1rem;
border-radius: 0.5rem;
@@ -409,7 +410,7 @@ onBeforeUnmount(() => editor.value?.destroy())
.selectedCell:after {
z-index: 2;
position: absolute;
- content: "";
+ content: '';
left: 0;
right: 0;
top: 0;
@@ -432,16 +433,16 @@ onBeforeUnmount(() => editor.value?.destroy())
margin: 0;
}
}
-
+
// Lists
ul {
margin-left: .5rem;
margin-top: 0 !important;
-
+
li {
margin-top: 0;
}
-
+
p {
margin-bottom: 0 !important;
}
@@ -458,7 +459,7 @@ onBeforeUnmount(() => editor.value?.destroy())
}
// tasklist
-ul[data-type="taskList"] {
+ul[data-type='taskList'] {
list-style: none;
padding: 0;
margin-left: 0;
@@ -477,7 +478,7 @@ ul[data-type="taskList"] {
}
}
- input[type="checkbox"] {
+ input[type='checkbox'] {
cursor: pointer;
}
}