diff --git a/src/components/input/editor.vue b/src/components/input/editor.vue
index be2e9105..d51ed19f 100644
--- a/src/components/input/editor.vue
+++ b/src/components/input/editor.vue
@@ -53,6 +53,7 @@ import {createEasyMDEConfig} from './editorConfig'
import AttachmentModel from '../../models/attachment'
import AttachmentService from '../../services/attachment'
import {findCheckboxesInText} from '../../helpers/checklistFromText'
+import {createRandomID} from '@/helpers/randomId'
export default {
name: 'editor',
@@ -122,6 +123,7 @@ export default {
uploadImage: this.uploadEnabled,
imageUploadFunction: this.uploadCallback,
}),
+ checkboxId: createRandomID(),
}
},
watch: {
@@ -208,7 +210,7 @@ export default {
}
checkboxNum++
- return ``
+ return ``
},
link: (href, title, text) => {
const isLocal = href.startsWith(`${location.protocol}//${location.hostname}`)
@@ -260,7 +262,7 @@ export default {
}
}
- const textCheckbox = document.getElementsByClassName(`text-checkbox-${this._uid}`)
+ const textCheckbox = document.getElementsByClassName(`text-checkbox-${this.checkboxId}`)
if (textCheckbox) {
for (const check of textCheckbox) {
check.removeEventListener('change', this.handleCheckboxClick)