Skip to content

Commit a0b9c08

Browse files
committed
refactor: tinymce version update
1 parent 8310229 commit a0b9c08

File tree

2 files changed

+25
-8
lines changed

2 files changed

+25
-8
lines changed

frontend/src/views/dashboard/components/sq-text/index.vue

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
<template>
2-
<div
3-
class="rich-main-class"
4-
:class="{ 'edit-model': configItem.editing }"
5-
@keydown.stop
6-
@keyup.stop
7-
@dblclick="setEdit"
8-
>
2+
<div class="rich-main-class" :class="{ 'edit-model': configItem.editing }" draggable="false">
3+
<div
4+
draggable="false"
5+
:class="{ 'custom-text-content': true, 'preview-text': true, 'layer-hidden': !isDisabled }"
6+
@keydown.stop
7+
@keyup.stop
8+
@mousedown.stop
9+
@dblclick.stop="setEdit"
10+
v-html="configItem.propValue"
11+
></div>
912
<editor
1013
:id="tinymceId"
1114
v-model="configItem.propValue"
12-
:class="{ 'custom-text-content': true, dragHandle: isDisabled }"
15+
draggable="false"
16+
:class="{ 'custom-text-content': true, 'layer-hidden': isDisabled }"
1317
:init="init"
1418
></editor>
1519
</div>
@@ -38,6 +42,8 @@ import '@npkg/tinymce-plugins/letterspacing'
3842
import { computed, nextTick, type PropType, reactive, toRefs } from 'vue'
3943
import { onMounted } from 'vue'
4044
import type { CanvasItem } from '@/utils/canvas.ts'
45+
import { dashboardStoreWithOut } from '@/stores/dashboard/dashboard.ts'
46+
const dashboardStore = dashboardStoreWithOut()
4147
4248
const props = defineProps({
4349
configItem: {
@@ -82,6 +88,7 @@ const isDisabled = computed(() => props.disabled || !configItem.value.editing)
8288
8389
const setEdit = () => {
8490
configItem.value.editing = true
91+
dashboardStore.setCurComponent(configItem.value)
8592
nextTick(() => {
8693
editCursor()
8794
})
@@ -163,9 +170,18 @@ onMounted(() => {
163170
outline: none !important;
164171
border: none !important;
165172
margin: 2px;
173+
cursor: text;
166174
167175
ol {
168176
list-style-type: decimal;
169177
}
170178
}
179+
180+
.layer-hidden {
181+
display: none !important;
182+
}
183+
184+
.preview-text {
185+
cursor: pointer;
186+
}
171187
</style>

frontend/src/views/dashboard/preview/SQComponentWrapper.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ const viewDemoInnerId = computed(() => 'enlarge-inner-content-' + configItem.val
4545
:view-info="canvasViewInfo[configItem.id]"
4646
:config-item="configItem"
4747
:show-position="showPosition"
48+
:disabled="true"
4849
:active="active"
4950
/>
5051
</div>

0 commit comments

Comments
 (0)