-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e48bee1
commit cd21319
Showing
11 changed files
with
297 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<template> | ||
<div class="view-area"> | ||
<DragonEditorViewer :content="data" /> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { ref, onMounted } from "#imports"; | ||
const data = ref([ | ||
{ type: "text", textContent: "123" }, | ||
{ type: "text", textContent: "123" }, | ||
{ type: "heading", level: 1, id: "Sgdaow", textContent: "123" }, | ||
{ type: "heading", level: 2, id: "zlfm8i", textContent: "123" }, | ||
{ type: "heading", level: 3, id: "D0ZRSP", textContent: "123" }, | ||
{ type: "ul", child: ["123"] }, | ||
{ type: "ol", pattern: "1", child: ["123"] }, | ||
]); | ||
</script> | ||
|
||
<style lang="scss"> | ||
.view-area { | ||
max-width: 800px; | ||
margin: 0 auto; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<template> | ||
<div class="dragon-editor-viewer"> | ||
<template v-for="item in props.content"> | ||
<p v-if="item.type === 'text'" class="de-block de-text-block" v-html="item.textContent"></p> | ||
|
||
<template v-if="item.type === 'heading'"> | ||
<h1 v-if="item.level === 1" class="de-block de-heading-block" :data-level="item.level" v-html="item.textContent"></h1> | ||
<h2 v-if="item.level === 2" class="de-block de-heading-block" :data-level="item.level" v-html="item.textContent"></h2> | ||
<h3 v-if="item.level === 3" class="de-block de-heading-block" :data-level="item.level" v-html="item.textContent"></h3> | ||
</template> | ||
|
||
<ul v-if="item.type === 'ul'" class="de-block de-list-block"> | ||
<li v-for="li in item.child" class="de-item" v-html="li"></li> | ||
</ul> | ||
|
||
<ol v-if="item.type === 'ol'" class="de-block de-list-block" :type="item.pattern"> | ||
<li v-for="li in item.child" class="de-item" v-html="li"></li> | ||
</ol> | ||
</template> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
const props = defineProps<{ | ||
content: any[]; | ||
}>(); | ||
</script> | ||
|
||
<style lang="scss"> | ||
@import "../scss/viewer.scss"; | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
display: grid; | ||
gap: 4px; | ||
padding: 20px; | ||
line-height: 1.6; | ||
} | ||
|
||
// 컨트롤 메뉴 스타일 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,15 @@ | ||
@import "./base"; | ||
@import "./block"; | ||
@import "./style"; | ||
|
||
.dragon-editor-viewer { | ||
display: grid; | ||
gap: 4px; | ||
width: 100%; | ||
height: 100%; | ||
padding: 20px; | ||
line-height: 1.6; | ||
|
||
@include blockStyle("false"); | ||
@include NodeStyle; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.