Skip to content

Commit

Permalink
feat: beta.2.1 setting
Browse files Browse the repository at this point in the history
  • Loading branch information
lovefields committed Jul 2, 2023
1 parent 5688388 commit 1d572d1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dragon-editor",
"version": "2.0.0-beta.3",
"version": "2.0.0-beta.2.1",
"description": "WYSIWYG editor on Nuxt.js",
"repository": {
"type": "git",
Expand Down
7 changes: 6 additions & 1 deletion src/runtime/core/components/editor/OlBlock.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<ol class="d-ol-block" :class="data.classList" @keydown="textKeyboardEvent">
<li class="d-li-item" contenteditable></li>
<li class="d-li-item" contenteditable ref="$olItem"></li>
</ol>
</template>

Expand All @@ -10,6 +10,7 @@ import { ref, unref } from "#imports";
import { cursorSelection, listBlock, styleFunctionArgument } from "../../../../types";
import { getArrangementCursorData, setCursor, pasteText, styleSettings, keyboardEvent } from "../../utils";
const $olItem = ref();
const data = ref<listBlock>({
type: "",
id: "",
Expand All @@ -24,6 +25,10 @@ const emit = defineEmits<{
}>();
data.value = unref(props.modelValue) as listBlock;
if(data.value.childList.length === 0){
}
// 키보드 이벤트 할당
function textKeyboardEvent(e: KeyboardEvent) {
keyboardEvent("ol", e, emit, updateBlockData);
Expand Down
6 changes: 3 additions & 3 deletions src/runtime/shared/components/DragonEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
</template>

<template v-else>
<button v-if="item.target.indexOf(content[activeIdx].type) > -1" class="d-btn --hug" @click="item.action(count, j)">{{ item.value }}</button>
<button v-if="item.target.indexOf(content[activeIdx].type) > -1" class="d-btn --hug" @click="item.action(count, j)">{{ `${item.name} : ${item.value}` }}</button>

<div class="d-child-list" :class="{ '--active': item.active }">
<button class="d-child-btn" v-for="(child, k) in item.childList" :key="k" @click="child.action(count, j)">{{ child.name }}</button>
Expand Down Expand Up @@ -92,7 +92,7 @@ const props = defineProps<{
}>();
const modelValue = ref<editorContentType>([]);
const option = ref<editorOptions>({
blockMenu: ["text", "ol"],
blockMenu: ["text"],
// blockMenu: ["text", "ol", "ul", "table", "quotation"], // TODO : 다른 블럭 만들기
});
Expand Down Expand Up @@ -237,7 +237,7 @@ const styleButtonList = ref([
[
{
type: "list",
name: "Decoration Font Size",
name: "Font Size",
value: "default",
target: ["text"],
active: false,
Expand Down

0 comments on commit 1d572d1

Please sign in to comment.