dragon-editor 3.0.2 → 3.1.0
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/README.md +4 -4
- package/dist/module.json +1 -1
- package/dist/runtime/components/DragonEditor.vue +510 -21
- package/dist/runtime/components/DragonEditorViewer.vue +307 -6
- package/dist/runtime/scss/editor.css +300 -0
- package/dist/runtime/scss/viewer.css +291 -0
- package/dist/runtime/store.d.ts +1 -0
- package/dist/runtime/store.mjs +4 -0
- package/dist/runtime/type.d.ts +51 -4
- package/dist/runtime/utils/block.d.ts +6 -4
- package/dist/runtime/utils/block.mjs +63 -22
- package/dist/runtime/utils/content.d.ts +2 -0
- package/dist/runtime/utils/content.mjs +15 -0
- package/dist/runtime/utils/convertor.d.ts +2 -1
- package/dist/runtime/utils/convertor.mjs +68 -9
- package/dist/runtime/utils/keyboardEvent.mjs +29 -11
- package/dist/runtime/utils/style.d.ts +1 -0
- package/dist/runtime/utils/style.mjs +288 -263
- package/dist/runtime/utils/ui.d.ts +0 -1
- package/dist/runtime/utils/ui.mjs +0 -35
- package/package.json +3 -2
- package/dist/runtime/plugin.d.ts +0 -2
- package/dist/runtime/plugin.mjs +0 -10
package/README.md
CHANGED
|
@@ -68,7 +68,7 @@ Second. Use Component
|
|
|
68
68
|
</template>
|
|
69
69
|
|
|
70
70
|
<script setup lang="ts">
|
|
71
|
-
const $editor = ref<
|
|
71
|
+
const $editor = ref<DragonEditor>();
|
|
72
72
|
</script>
|
|
73
73
|
```
|
|
74
74
|
|
|
@@ -84,7 +84,7 @@ Done!
|
|
|
84
84
|
</template>
|
|
85
85
|
|
|
86
86
|
<script setup lang="ts">
|
|
87
|
-
const data = ref([]); // content data
|
|
87
|
+
const data = ref<DEContentData>([]); // content data
|
|
88
88
|
</script>
|
|
89
89
|
```
|
|
90
90
|
|
|
@@ -103,7 +103,7 @@ Done!
|
|
|
103
103
|
</template>
|
|
104
104
|
|
|
105
105
|
<script setup lang="ts">
|
|
106
|
-
const $editor = ref<
|
|
106
|
+
const $editor = ref<DragonEditor>();
|
|
107
107
|
|
|
108
108
|
function getData() {
|
|
109
109
|
console.log($editor.value.getContentData());
|
|
@@ -124,7 +124,7 @@ Done!
|
|
|
124
124
|
</template>
|
|
125
125
|
|
|
126
126
|
<script setup lang="ts">
|
|
127
|
-
const $editor = ref<
|
|
127
|
+
const $editor = ref<DragonEditor>();
|
|
128
128
|
|
|
129
129
|
function setData() {
|
|
130
130
|
$editor.value.setContentData([...]);
|
package/dist/module.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="dragon-editor" :class="{ '--hasMenu': props.useMenuBar === true }" ref="$editor">
|
|
2
|
+
<div class="dragon-editor" :class="{ '--hasMenu': props.useMenuBar === true }" @mousemove="resizeEvent" @touchmove="resizeEvent" @mouseup="resizeEventEnd" @touchend="resizeEventEnd" @mouseleave="resizeEventEnd" ref="$editor">
|
|
3
3
|
<div v-if="props.useMenuBar === true" class="de-control-bar">
|
|
4
4
|
<button class="de-menu de-menu-add" @click="isActiveAddBlockMenu = !isActiveAddBlockMenu">
|
|
5
5
|
<svg class="de-icon" viewBox="0 0 64 64">
|
|
@@ -40,6 +40,36 @@
|
|
|
40
40
|
</svg>
|
|
41
41
|
</button>
|
|
42
42
|
|
|
43
|
+
<button class="de-menu" @click="setTextAlign('left')">
|
|
44
|
+
<svg class="de-icon" viewBox="0 0 64 64">
|
|
45
|
+
<path class="de-path" d="M11 9C9.89543 9 9 9.89543 9 11C9 12.1046 9.89543 13 11 13H23C24.1046 13 25 12.1046 25 11C25 9.89543 24.1046 9 23 9H11Z M11 51C9.89543 51 9 51.8954 9 53C9 54.1046 9.89543 55 11 55H53C54.1046 55 55 54.1046 55 53C55 51.8954 54.1046 51 53 51H11Z M9 39C9 37.8954 9.89543 37 11 37H37C38.1046 37 39 37.8954 39 39C39 40.1046 38.1046 41 37 41H11C9.89543 41 9 40.1046 9 39Z M11 23C9.89543 23 9 23.8954 9 25C9 26.1046 9.89543 27 11 27H53C54.1046 27 55 26.1046 55 25C55 23.8954 54.1046 23 53 23H11Z"></path>
|
|
46
|
+
</svg>
|
|
47
|
+
</button>
|
|
48
|
+
|
|
49
|
+
<button class="de-menu" @click="setTextAlign('center')">
|
|
50
|
+
<svg class="de-icon" viewBox="0 0 64 64">
|
|
51
|
+
<path class="de-path" d="M24 11C24 9.89543 24.8954 9 26 9H38C39.1046 9 40 9.89543 40 11C40 12.1046 39.1046 13 38 13H26C24.8954 13 24 12.1046 24 11Z M9 53C9 51.8954 9.89543 51 11 51H53C54.1046 51 55 51.8954 55 53C55 54.1046 54.1046 55 53 55H11C9.89543 55 9 54.1046 9 53Z M17 39C17 37.8954 17.8954 37 19 37H45C46.1046 37 47 37.8954 47 39C47 40.1046 46.1046 41 45 41H19C17.8954 41 17 40.1046 17 39Z M9 25C9 23.8954 9.89543 23 11 23H53C54.1046 23 55 23.8954 55 25C55 26.1046 54.1046 27 53 27H11C9.89543 27 9 26.1046 9 25Z"></path>
|
|
52
|
+
</svg>
|
|
53
|
+
</button>
|
|
54
|
+
|
|
55
|
+
<button class="de-menu" @click="setTextAlign('right')">
|
|
56
|
+
<svg class="de-icon" viewBox="0 0 64 64">
|
|
57
|
+
<path class="de-path" d="M39 11C39 9.89543 39.8954 9 41 9H53C54.1046 9 55 9.89543 55 11C55 12.1046 54.1046 13 53 13H41C39.8954 13 39 12.1046 39 11Z M9 53C9 51.8954 9.89543 51 11 51H53C54.1046 51 55 51.8954 55 53C55 54.1046 54.1046 55 53 55H11C9.89543 55 9 54.1046 9 53Z M25 39C25 37.8954 25.8954 37 27 37H53C54.1046 37 55 37.8954 55 39C55 40.1046 54.1046 41 53 41H27C25.8954 41 25 40.1046 25 39Z M9 25C9 23.8954 9.89543 23 11 23H53C54.1046 23 55 23.8954 55 25C55 26.1046 54.1046 27 53 27H11C9.89543 27 9 26.1046 9 25Z"></path>
|
|
58
|
+
</svg>
|
|
59
|
+
</button>
|
|
60
|
+
|
|
61
|
+
<button class="de-menu" @click="setTextAlign('justify')">
|
|
62
|
+
<svg class="de-icon" viewBox="0 0 64 64">
|
|
63
|
+
<path class="de-path" d="M9 53C9 51.8954 9.89543 51 11 51H53C54.1046 51 55 51.8954 55 53C55 54.1046 54.1046 55 53 55H11C9.89543 55 9 54.1046 9 53Z M9 39C9 37.8954 9.89543 37 11 37H53C54.1046 37 55 37.8954 55 39C55 40.1046 54.1046 41 53 41H11C9.89543 41 9 40.1046 9 39Z M9 11C9 9.89543 9.89543 9 11 9H53C54.1046 9 55 9.89543 55 11C55 12.1046 54.1046 13 53 13H11C9.89543 13 9 12.1046 9 11Z M9 25C9 23.8954 9.89543 23 11 23H53C54.1046 23 55 23.8954 55 25C55 26.1046 54.1046 27 53 27H11C9.89543 27 9 26.1046 9 25Z"></path>
|
|
64
|
+
</svg>
|
|
65
|
+
</button>
|
|
66
|
+
|
|
67
|
+
<button class="de-menu" @click="deleteBlock">
|
|
68
|
+
<svg class="de-icon" viewBox="0 0 64 64">
|
|
69
|
+
<path class="de-path --red" fill-rule="evenodd" clip-rule="evenodd" d="M32 51C42.4934 51 51 42.4934 51 32C51 21.5066 42.4934 13 32 13C21.5066 13 13 21.5066 13 32C13 42.4934 21.5066 51 32 51ZM32 55C44.7026 55 55 44.7026 55 32C55 19.2974 44.7026 9 32 9C19.2974 9 9 19.2974 9 32C9 44.7026 19.2974 55 32 55ZM21.4142 42.6274C20.6332 41.8462 20.6332 40.5801 21.4142 39.7988L29.1715 32.0415L21.5858 24.4558C20.8047 23.6748 20.8047 22.4084 21.5858 21.6274C22.3668 20.8462 23.6332 20.8462 24.4142 21.6274L31.9999 29.2131L39.799 21.4141C40.58 20.6331 41.8464 20.6331 42.6274 21.4141C43.4084 22.1953 43.4084 23.4614 42.6274 24.2427L34.8284 32.0417L42.799 40.0122C43.58 40.7932 43.58 42.0596 42.799 42.8406C42.0179 43.6216 40.7516 43.6216 39.9706 42.8406L32.0001 34.8701L24.2426 42.6274C23.4616 43.4084 22.1953 43.4084 21.4142 42.6274Z"></path>
|
|
70
|
+
</svg>
|
|
71
|
+
</button>
|
|
72
|
+
|
|
43
73
|
<div class="de-block-menu-area" :class="{ '--active': isActiveAddBlockMenu }">
|
|
44
74
|
<div class="de-list">
|
|
45
75
|
<button class="de-add-block" @click="addBlock('text')">Text</button>
|
|
@@ -48,11 +78,13 @@
|
|
|
48
78
|
<button class="de-add-block" @click="addBlock('heading3')">Heading-3</button>
|
|
49
79
|
<button class="de-add-block" @click="addBlock('ul')">Unodered List</button>
|
|
50
80
|
<button class="de-add-block" @click="addBlock('ol')">Odered List</button>
|
|
81
|
+
<!-- <button class="de-add-block" @click="addBlock('codeblock')">Code Block</button> -->
|
|
82
|
+
<!-- <button class="de-add-block" @click="addBlock('video')">Video</button> -->
|
|
51
83
|
</div>
|
|
52
84
|
</div>
|
|
53
85
|
</div>
|
|
54
86
|
|
|
55
|
-
<div class="de-body" ref="$content" @keydown="contentKeyboardEvent" @mouseup="updateCursorData">
|
|
87
|
+
<div class="de-body" ref="$content" @keydown="contentKeyboardEvent" @mouseup="updateCursorData" @mousedown="resizeEventStart" @touchstart="resizeEventStart">
|
|
56
88
|
<p class="de-block de-text-block" contenteditable="true"></p>
|
|
57
89
|
</div>
|
|
58
90
|
</div>
|
|
@@ -63,10 +95,11 @@ import { ref, onMounted, onUnmounted } from "vue";
|
|
|
63
95
|
import { useEditorStore } from "../store";
|
|
64
96
|
import { _findScrollingElement, _findContentEditableElement } from "../utils/element";
|
|
65
97
|
import { _elementKeyEvent, _hotKeyEvent } from "../utils/keyboardEvent";
|
|
66
|
-
import { _createTextBlock, _createHeadingBlock, _createListBlock } from "../utils/block";
|
|
67
|
-
import { _setNodeStyle } from "../utils/style";
|
|
98
|
+
import { _createTextBlock, _createHeadingBlock, _createListBlock, _createImageBlock, _createCustomBlock } from "../utils/block";
|
|
99
|
+
import { _setNodeStyle, _setTextAlign } from "../utils/style";
|
|
68
100
|
import { _setCursorData, _clenupCursor } from "../utils/cursor";
|
|
69
101
|
import { _getContentData, _setContentData } from "../utils/convertor";
|
|
102
|
+
import { _addBlockToContent } from "../utils/content";
|
|
70
103
|
import "../type.d.ts";
|
|
71
104
|
|
|
72
105
|
const props = defineProps({
|
|
@@ -80,6 +113,11 @@ const editorStore = useEditorStore();
|
|
|
80
113
|
const isActiveAddBlockMenu = ref<boolean>(false);
|
|
81
114
|
const $editor = ref<HTMLDivElement>();
|
|
82
115
|
const $content = ref<HTMLDivElement>();
|
|
116
|
+
let resizeEventActive: boolean = false;
|
|
117
|
+
let resizeStartX: number = 0;
|
|
118
|
+
let resizeType: string = "right";
|
|
119
|
+
let resizeEndX: number = 0;
|
|
120
|
+
let resizeCurruntWidth: number = 0;
|
|
83
121
|
|
|
84
122
|
/**
|
|
85
123
|
* 이벤트 관련 영역 시작
|
|
@@ -99,6 +137,104 @@ function updateCursorData(e: MouseEvent) {
|
|
|
99
137
|
// 비정상 커서 값일 경우 초기화
|
|
100
138
|
editorStore.cursorData = originalCursorData;
|
|
101
139
|
}
|
|
140
|
+
|
|
141
|
+
if (e.target !== null) {
|
|
142
|
+
const $block = (e.target as HTMLElement).closest(".de-block");
|
|
143
|
+
|
|
144
|
+
if ($block !== null) {
|
|
145
|
+
editorStore.setCurrentBlock($block as HTMLElement);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// 사이즈 조정 이벤트 시작
|
|
151
|
+
function resizeEventStart(event: Event) {
|
|
152
|
+
const $target = event.target as HTMLElement;
|
|
153
|
+
|
|
154
|
+
if ($target !== null) {
|
|
155
|
+
const $block = $target.closest(".de-block");
|
|
156
|
+
|
|
157
|
+
if ($block?.classList.contains("de-image-block") === true && $target.classList.contains("de-btn") === true) {
|
|
158
|
+
editorStore.setCurrentBlock($block as HTMLElement);
|
|
159
|
+
resizeEventActive = true;
|
|
160
|
+
|
|
161
|
+
if (event.type === "touchstart") {
|
|
162
|
+
resizeStartX = (event as TouchEvent).touches[0].clientX;
|
|
163
|
+
} else {
|
|
164
|
+
resizeStartX = (event as MouseEvent).clientX;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
if ($target.classList.contains("de-btn-left") === true) {
|
|
168
|
+
resizeType = "left";
|
|
169
|
+
} else {
|
|
170
|
+
resizeType = "right";
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
resizeEndX = resizeStartX;
|
|
174
|
+
|
|
175
|
+
const $imgArea = (editorStore.$currentBlock as HTMLElement).querySelector(".de-image-area") as HTMLDivElement;
|
|
176
|
+
resizeCurruntWidth = parseInt($imgArea.dataset["maxwidth"] ?? "25");
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// 사이즈 조정 이벤트
|
|
182
|
+
function resizeEvent(event: Event) {
|
|
183
|
+
if (resizeEventActive === true) {
|
|
184
|
+
const $imgArea = (editorStore.$currentBlock as HTMLElement).querySelector(".de-image-area") as HTMLDivElement;
|
|
185
|
+
const contentWidth = (editorStore.$content?.offsetWidth ?? 0) / 2;
|
|
186
|
+
let gap: number = 0;
|
|
187
|
+
|
|
188
|
+
if (event.type === "touchmove") {
|
|
189
|
+
resizeEndX = (event as TouchEvent).touches[0].clientX;
|
|
190
|
+
} else {
|
|
191
|
+
resizeEndX = (event as MouseEvent).clientX;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
if (resizeType === "right") {
|
|
195
|
+
gap = Math.floor(resizeStartX - resizeEndX);
|
|
196
|
+
} else {
|
|
197
|
+
gap = Math.floor(resizeEndX - resizeStartX);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
const percent = (100 / contentWidth) * gap;
|
|
201
|
+
let value = Math.floor(resizeCurruntWidth - percent);
|
|
202
|
+
|
|
203
|
+
if (value < 25) {
|
|
204
|
+
value = 25;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
if (value > 100) {
|
|
208
|
+
value = 100;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
$imgArea.dataset["maxwidth"] = String(value);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// 사이즈 조정 이벤트 종료
|
|
216
|
+
function resizeEventEnd() {
|
|
217
|
+
if (resizeEventActive === true) {
|
|
218
|
+
resizeEventActive = false;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// 메뉴 외부 클릭시 닫기
|
|
223
|
+
function checkOthersideClick(event: MouseEvent) {
|
|
224
|
+
if (event.target !== null) {
|
|
225
|
+
const $controlBar = (event.target as HTMLElement).closest(".de-control-bar");
|
|
226
|
+
|
|
227
|
+
if ($controlBar === null) {
|
|
228
|
+
isActiveAddBlockMenu.value = false;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
// 블럭 삭제
|
|
234
|
+
function deleteBlock() {
|
|
235
|
+
if (editorStore.$currentBlock !== null) {
|
|
236
|
+
editorStore.$currentBlock.remove();
|
|
237
|
+
}
|
|
102
238
|
}
|
|
103
239
|
|
|
104
240
|
/**
|
|
@@ -117,29 +253,49 @@ function addBlock(type: string) {
|
|
|
117
253
|
case "heading1":
|
|
118
254
|
case "heading2":
|
|
119
255
|
case "heading3":
|
|
120
|
-
|
|
256
|
+
const level: number = parseInt(type.replace("heading", ""));
|
|
257
|
+
|
|
258
|
+
blockStructure = _createHeadingBlock({
|
|
259
|
+
type: "heading",
|
|
260
|
+
classList: [],
|
|
261
|
+
id: "",
|
|
262
|
+
level: level,
|
|
263
|
+
textContent: "",
|
|
264
|
+
});
|
|
121
265
|
break;
|
|
122
266
|
case "ul":
|
|
267
|
+
blockStructure = _createListBlock({
|
|
268
|
+
type: type,
|
|
269
|
+
child: [
|
|
270
|
+
{
|
|
271
|
+
classList: [],
|
|
272
|
+
textContent: "",
|
|
273
|
+
},
|
|
274
|
+
],
|
|
275
|
+
});
|
|
276
|
+
break;
|
|
123
277
|
case "ol":
|
|
124
|
-
blockStructure = _createListBlock(
|
|
278
|
+
blockStructure = _createListBlock({
|
|
279
|
+
type: type,
|
|
280
|
+
pattern: "1",
|
|
281
|
+
child: [
|
|
282
|
+
{
|
|
283
|
+
classList: [],
|
|
284
|
+
textContent: "",
|
|
285
|
+
},
|
|
286
|
+
],
|
|
287
|
+
});
|
|
288
|
+
break;
|
|
289
|
+
case "table":
|
|
290
|
+
// TODO : table block
|
|
291
|
+
break;
|
|
292
|
+
case "codeblock":
|
|
293
|
+
// TODO : Code Block
|
|
125
294
|
break;
|
|
126
295
|
}
|
|
127
296
|
|
|
128
297
|
if (blockStructure !== null) {
|
|
129
|
-
|
|
130
|
-
(editorStore.$content as HTMLDivElement).insertAdjacentElement("beforeend", blockStructure);
|
|
131
|
-
} else {
|
|
132
|
-
_clenupCursor(editorStore);
|
|
133
|
-
let $target = editorStore.cursorData.startNode;
|
|
134
|
-
|
|
135
|
-
if ($target.constructor.name === "Text") {
|
|
136
|
-
$target = $target.parentNode as Node;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
const $block = ($target as HTMLElement).closest(".de-block") as Element;
|
|
140
|
-
|
|
141
|
-
$block.insertAdjacentElement("afterend", blockStructure);
|
|
142
|
-
}
|
|
298
|
+
_addBlockToContent(blockStructure, editorStore);
|
|
143
299
|
|
|
144
300
|
switch (type) {
|
|
145
301
|
case "ul":
|
|
@@ -152,10 +308,35 @@ function addBlock(type: string) {
|
|
|
152
308
|
}
|
|
153
309
|
}
|
|
154
310
|
|
|
155
|
-
function
|
|
311
|
+
function addCustomBlock(HTML: string, classList: string[] = []) {
|
|
312
|
+
const blockStructure = _createCustomBlock({
|
|
313
|
+
type: "custom",
|
|
314
|
+
classList: classList,
|
|
315
|
+
textContent: HTML,
|
|
316
|
+
});
|
|
317
|
+
|
|
318
|
+
_addBlockToContent(blockStructure, editorStore);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
function addImageBlock(data: DEImage) {
|
|
322
|
+
const blockStructure = _createImageBlock({
|
|
323
|
+
...data,
|
|
324
|
+
type: "image",
|
|
325
|
+
maxWidth: 100,
|
|
326
|
+
classList: [],
|
|
327
|
+
} as DEImageBlock);
|
|
328
|
+
|
|
329
|
+
_addBlockToContent(blockStructure, editorStore);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
function setDecoration(type: DEDecoration) {
|
|
156
333
|
_setNodeStyle(`de-${type}`, editorStore);
|
|
157
334
|
}
|
|
158
335
|
|
|
336
|
+
function setTextAlign(type: DETextalign) {
|
|
337
|
+
_setTextAlign(type, editorStore);
|
|
338
|
+
}
|
|
339
|
+
|
|
159
340
|
function getContentData(): DEContentData {
|
|
160
341
|
if (editorStore.$content !== null) {
|
|
161
342
|
return _getContentData(editorStore.$content);
|
|
@@ -179,17 +360,25 @@ onMounted(() => {
|
|
|
179
360
|
editorStore.setContentElement($content.value);
|
|
180
361
|
}
|
|
181
362
|
|
|
363
|
+
window.addEventListener("click", checkOthersideClick, true);
|
|
364
|
+
|
|
182
365
|
// TODO : set scroll event
|
|
183
366
|
});
|
|
184
367
|
|
|
185
368
|
onUnmounted(() => {
|
|
369
|
+
window.removeEventListener("click", checkOthersideClick, true);
|
|
370
|
+
|
|
186
371
|
// TODO : remove scroll event
|
|
187
372
|
});
|
|
188
373
|
|
|
189
374
|
defineExpose({
|
|
190
375
|
addBlock,
|
|
376
|
+
addImageBlock,
|
|
377
|
+
setDecoration,
|
|
378
|
+
setTextAlign,
|
|
191
379
|
getContentData,
|
|
192
380
|
setContentData,
|
|
381
|
+
addCustomBlock,
|
|
193
382
|
});
|
|
194
383
|
</script>
|
|
195
384
|
|
|
@@ -359,6 +548,9 @@ defineExpose({
|
|
|
359
548
|
.dragon-editor .de-control-bar .de-menu.--lastchild {
|
|
360
549
|
border-right: 0;
|
|
361
550
|
}
|
|
551
|
+
.dragon-editor .de-control-bar .de-menu .de-path.--red {
|
|
552
|
+
fill: #dd0000;
|
|
553
|
+
}
|
|
362
554
|
.dragon-editor .de-control-bar .de-block-menu-area {
|
|
363
555
|
display: none;
|
|
364
556
|
position: absolute;
|
|
@@ -431,6 +623,291 @@ defineExpose({
|
|
|
431
623
|
.dragon-editor ol.de-list-block {
|
|
432
624
|
list-style: decimal;
|
|
433
625
|
}
|
|
626
|
+
.dragon-editor .de-image-block {
|
|
627
|
+
display: flex;
|
|
628
|
+
align-items: center;
|
|
629
|
+
flex-direction: column;
|
|
630
|
+
row-gap: 8px;
|
|
631
|
+
}
|
|
632
|
+
.dragon-editor .de-image-block.de-align-left {
|
|
633
|
+
align-items: flex-start;
|
|
634
|
+
}
|
|
635
|
+
.dragon-editor .de-image-block.de-align-left .de-caption {
|
|
636
|
+
text-align: left;
|
|
637
|
+
}
|
|
638
|
+
.dragon-editor .de-image-block.de-align-right {
|
|
639
|
+
align-items: flex-end;
|
|
640
|
+
}
|
|
641
|
+
.dragon-editor .de-image-block.de-align-right .de-caption {
|
|
642
|
+
text-align: right;
|
|
643
|
+
}
|
|
644
|
+
.dragon-editor .de-image-block .de-image-area {
|
|
645
|
+
position: relative;
|
|
646
|
+
max-width: 25%;
|
|
647
|
+
}
|
|
648
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="25"] {
|
|
649
|
+
max-width: 25%;
|
|
650
|
+
}
|
|
651
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="26"] {
|
|
652
|
+
max-width: 26%;
|
|
653
|
+
}
|
|
654
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="27"] {
|
|
655
|
+
max-width: 27%;
|
|
656
|
+
}
|
|
657
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="28"] {
|
|
658
|
+
max-width: 28%;
|
|
659
|
+
}
|
|
660
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="29"] {
|
|
661
|
+
max-width: 29%;
|
|
662
|
+
}
|
|
663
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="30"] {
|
|
664
|
+
max-width: 30%;
|
|
665
|
+
}
|
|
666
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="31"] {
|
|
667
|
+
max-width: 31%;
|
|
668
|
+
}
|
|
669
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="32"] {
|
|
670
|
+
max-width: 32%;
|
|
671
|
+
}
|
|
672
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="33"] {
|
|
673
|
+
max-width: 33%;
|
|
674
|
+
}
|
|
675
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="34"] {
|
|
676
|
+
max-width: 34%;
|
|
677
|
+
}
|
|
678
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="35"] {
|
|
679
|
+
max-width: 35%;
|
|
680
|
+
}
|
|
681
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="36"] {
|
|
682
|
+
max-width: 36%;
|
|
683
|
+
}
|
|
684
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="37"] {
|
|
685
|
+
max-width: 37%;
|
|
686
|
+
}
|
|
687
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="38"] {
|
|
688
|
+
max-width: 38%;
|
|
689
|
+
}
|
|
690
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="39"] {
|
|
691
|
+
max-width: 39%;
|
|
692
|
+
}
|
|
693
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="40"] {
|
|
694
|
+
max-width: 40%;
|
|
695
|
+
}
|
|
696
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="41"] {
|
|
697
|
+
max-width: 41%;
|
|
698
|
+
}
|
|
699
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="42"] {
|
|
700
|
+
max-width: 42%;
|
|
701
|
+
}
|
|
702
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="43"] {
|
|
703
|
+
max-width: 43%;
|
|
704
|
+
}
|
|
705
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="44"] {
|
|
706
|
+
max-width: 44%;
|
|
707
|
+
}
|
|
708
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="45"] {
|
|
709
|
+
max-width: 45%;
|
|
710
|
+
}
|
|
711
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="46"] {
|
|
712
|
+
max-width: 46%;
|
|
713
|
+
}
|
|
714
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="47"] {
|
|
715
|
+
max-width: 47%;
|
|
716
|
+
}
|
|
717
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="48"] {
|
|
718
|
+
max-width: 48%;
|
|
719
|
+
}
|
|
720
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="49"] {
|
|
721
|
+
max-width: 49%;
|
|
722
|
+
}
|
|
723
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="50"] {
|
|
724
|
+
max-width: 50%;
|
|
725
|
+
}
|
|
726
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="51"] {
|
|
727
|
+
max-width: 51%;
|
|
728
|
+
}
|
|
729
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="52"] {
|
|
730
|
+
max-width: 52%;
|
|
731
|
+
}
|
|
732
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="53"] {
|
|
733
|
+
max-width: 53%;
|
|
734
|
+
}
|
|
735
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="54"] {
|
|
736
|
+
max-width: 54%;
|
|
737
|
+
}
|
|
738
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="55"] {
|
|
739
|
+
max-width: 55%;
|
|
740
|
+
}
|
|
741
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="56"] {
|
|
742
|
+
max-width: 56%;
|
|
743
|
+
}
|
|
744
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="57"] {
|
|
745
|
+
max-width: 57%;
|
|
746
|
+
}
|
|
747
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="58"] {
|
|
748
|
+
max-width: 58%;
|
|
749
|
+
}
|
|
750
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="59"] {
|
|
751
|
+
max-width: 59%;
|
|
752
|
+
}
|
|
753
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="60"] {
|
|
754
|
+
max-width: 60%;
|
|
755
|
+
}
|
|
756
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="61"] {
|
|
757
|
+
max-width: 61%;
|
|
758
|
+
}
|
|
759
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="62"] {
|
|
760
|
+
max-width: 62%;
|
|
761
|
+
}
|
|
762
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="63"] {
|
|
763
|
+
max-width: 63%;
|
|
764
|
+
}
|
|
765
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="64"] {
|
|
766
|
+
max-width: 64%;
|
|
767
|
+
}
|
|
768
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="65"] {
|
|
769
|
+
max-width: 65%;
|
|
770
|
+
}
|
|
771
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="66"] {
|
|
772
|
+
max-width: 66%;
|
|
773
|
+
}
|
|
774
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="67"] {
|
|
775
|
+
max-width: 67%;
|
|
776
|
+
}
|
|
777
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="68"] {
|
|
778
|
+
max-width: 68%;
|
|
779
|
+
}
|
|
780
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="69"] {
|
|
781
|
+
max-width: 69%;
|
|
782
|
+
}
|
|
783
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="70"] {
|
|
784
|
+
max-width: 70%;
|
|
785
|
+
}
|
|
786
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="71"] {
|
|
787
|
+
max-width: 71%;
|
|
788
|
+
}
|
|
789
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="72"] {
|
|
790
|
+
max-width: 72%;
|
|
791
|
+
}
|
|
792
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="73"] {
|
|
793
|
+
max-width: 73%;
|
|
794
|
+
}
|
|
795
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="74"] {
|
|
796
|
+
max-width: 74%;
|
|
797
|
+
}
|
|
798
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="75"] {
|
|
799
|
+
max-width: 75%;
|
|
800
|
+
}
|
|
801
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="76"] {
|
|
802
|
+
max-width: 76%;
|
|
803
|
+
}
|
|
804
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="77"] {
|
|
805
|
+
max-width: 77%;
|
|
806
|
+
}
|
|
807
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="78"] {
|
|
808
|
+
max-width: 78%;
|
|
809
|
+
}
|
|
810
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="79"] {
|
|
811
|
+
max-width: 79%;
|
|
812
|
+
}
|
|
813
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="80"] {
|
|
814
|
+
max-width: 80%;
|
|
815
|
+
}
|
|
816
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="81"] {
|
|
817
|
+
max-width: 81%;
|
|
818
|
+
}
|
|
819
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="82"] {
|
|
820
|
+
max-width: 82%;
|
|
821
|
+
}
|
|
822
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="83"] {
|
|
823
|
+
max-width: 83%;
|
|
824
|
+
}
|
|
825
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="84"] {
|
|
826
|
+
max-width: 84%;
|
|
827
|
+
}
|
|
828
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="85"] {
|
|
829
|
+
max-width: 85%;
|
|
830
|
+
}
|
|
831
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="86"] {
|
|
832
|
+
max-width: 86%;
|
|
833
|
+
}
|
|
834
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="87"] {
|
|
835
|
+
max-width: 87%;
|
|
836
|
+
}
|
|
837
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="88"] {
|
|
838
|
+
max-width: 88%;
|
|
839
|
+
}
|
|
840
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="89"] {
|
|
841
|
+
max-width: 89%;
|
|
842
|
+
}
|
|
843
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="90"] {
|
|
844
|
+
max-width: 90%;
|
|
845
|
+
}
|
|
846
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="91"] {
|
|
847
|
+
max-width: 91%;
|
|
848
|
+
}
|
|
849
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="92"] {
|
|
850
|
+
max-width: 92%;
|
|
851
|
+
}
|
|
852
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="93"] {
|
|
853
|
+
max-width: 93%;
|
|
854
|
+
}
|
|
855
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="94"] {
|
|
856
|
+
max-width: 94%;
|
|
857
|
+
}
|
|
858
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="95"] {
|
|
859
|
+
max-width: 95%;
|
|
860
|
+
}
|
|
861
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="96"] {
|
|
862
|
+
max-width: 96%;
|
|
863
|
+
}
|
|
864
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="97"] {
|
|
865
|
+
max-width: 97%;
|
|
866
|
+
}
|
|
867
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="98"] {
|
|
868
|
+
max-width: 98%;
|
|
869
|
+
}
|
|
870
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="99"] {
|
|
871
|
+
max-width: 99%;
|
|
872
|
+
}
|
|
873
|
+
.dragon-editor .de-image-block .de-image-area[data-maxwidth="100"] {
|
|
874
|
+
max-width: 100%;
|
|
875
|
+
}
|
|
876
|
+
.dragon-editor .de-image-block .de-image-area .de-img {
|
|
877
|
+
width: 100%;
|
|
878
|
+
height: auto;
|
|
879
|
+
}
|
|
880
|
+
.dragon-editor .de-image-block .de-image-area .de-btn {
|
|
881
|
+
position: absolute;
|
|
882
|
+
top: 50%;
|
|
883
|
+
width: 8px;
|
|
884
|
+
height: 100px;
|
|
885
|
+
background: #ccc;
|
|
886
|
+
border: 1px solid #333;
|
|
887
|
+
transform: translate(-50%, -50%);
|
|
888
|
+
cursor: col-resize;
|
|
889
|
+
user-select: none;
|
|
890
|
+
z-index: 100;
|
|
891
|
+
}
|
|
892
|
+
.dragon-editor .de-image-block .de-image-area .de-btn.de-btn-left {
|
|
893
|
+
left: 0;
|
|
894
|
+
}
|
|
895
|
+
.dragon-editor .de-image-block .de-image-area .de-btn.de-btn-right {
|
|
896
|
+
left: 100%;
|
|
897
|
+
}
|
|
898
|
+
.dragon-editor .de-image-block .de-caption {
|
|
899
|
+
width: 100%;
|
|
900
|
+
min-height: 1.6em;
|
|
901
|
+
color: #909090;
|
|
902
|
+
text-align: center;
|
|
903
|
+
outline: 0;
|
|
904
|
+
}
|
|
905
|
+
.dragon-editor .de-image-block .de-caption:empty:hover::before, .dragon-editor .de-image-block .de-caption:empty:focus::before {
|
|
906
|
+
display: inline;
|
|
907
|
+
content: "Type a caption";
|
|
908
|
+
color: #ccc;
|
|
909
|
+
cursor: text;
|
|
910
|
+
}
|
|
434
911
|
.dragon-editor .de-bold {
|
|
435
912
|
font-weight: 700;
|
|
436
913
|
}
|
|
@@ -455,4 +932,16 @@ defineExpose({
|
|
|
455
932
|
color: #ff0000;
|
|
456
933
|
border-radius: 5px;
|
|
457
934
|
}
|
|
935
|
+
.dragon-editor .de-align-left {
|
|
936
|
+
text-align: left;
|
|
937
|
+
}
|
|
938
|
+
.dragon-editor .de-align-right {
|
|
939
|
+
text-align: right;
|
|
940
|
+
}
|
|
941
|
+
.dragon-editor .de-align-center {
|
|
942
|
+
text-align: center;
|
|
943
|
+
}
|
|
944
|
+
.dragon-editor .de-align-justify {
|
|
945
|
+
text-align: justify;
|
|
946
|
+
}
|
|
458
947
|
</style>
|