Skip to content

Commit

Permalink
docs(fluent-editor): fix text exceeding problem caused by too long co…
Browse files Browse the repository at this point in the history
…ntent in the fluent-editor component demo (#2711)

* docs(fluent-editor): fixed text exceeding problem caused by too long content in the fluent-editor component demo

* docs(fluent-editor): remove useless demo code
  • Loading branch information
kagol authored Dec 28, 2024
1 parent b1e5e77 commit 1b2de8e
Show file tree
Hide file tree
Showing 12 changed files with 40 additions and 60 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div>
<tiny-fluent-editor v-model="content"></tiny-fluent-editor>
<tiny-fluent-editor v-model="content"></tiny-fluent-editor>
<div class="fluent-editor-demo__basic-usage__content">
内容:<br />
{{ content }}
</div>
Expand All @@ -12,3 +12,11 @@ import { TinyFluentEditor } from '@opentiny/vue'
const content = ref('{"ops":[{"insert":"Hello "},{"attributes":{"bold":true},"insert":"FluentEditor"},{"insert":"!"}]}')
</script>

<style scoped>
.fluent-editor-demo__basic-usage__content {
margin: 16px 0;
line-height: 1.5;
word-break: break-word;
}
</style>
12 changes: 10 additions & 2 deletions examples/sites/demos/pc/app/fluent-editor/basic-usage.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div>
<tiny-fluent-editor v-model="content"></tiny-fluent-editor>
<tiny-fluent-editor v-model="content"></tiny-fluent-editor>
<div class="fluent-editor-demo__basic-usage__content">
内容:<br />
{{ content }}
</div>
Expand All @@ -20,3 +20,11 @@ export default {
}
}
</script>

<style scoped>
.fluent-editor-demo__basic-usage__content {
margin: 16px 0;
line-height: 1.5;
word-break: break-word;
}
</style>
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
<template>
<div>
<tiny-fluent-editor
ref="fluentEditorRef"
v-model="content"
:before-editor-init="beforeEditorInit"
:options="editorOptions"
></tiny-fluent-editor>
内容:<br />
{{ content }}
</div>
<tiny-fluent-editor
ref="fluentEditorRef"
v-model="content"
:before-editor-init="beforeEditorInit"
:options="editorOptions"
></tiny-fluent-editor>
</template>

<script setup>
Expand Down
16 changes: 6 additions & 10 deletions examples/sites/demos/pc/app/fluent-editor/before-editor-init.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
<template>
<div>
<tiny-fluent-editor
ref="fluentEditorRef"
v-model="content"
:before-editor-init="beforeEditorInit"
:options="editorOptions"
></tiny-fluent-editor>
内容:<br />
{{ content }}
</div>
<tiny-fluent-editor
ref="fluentEditorRef"
v-model="content"
:before-editor-init="beforeEditorInit"
:options="editorOptions"
></tiny-fluent-editor>
</template>

<script>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<template>
<div>
<tiny-fluent-editor v-model="value" :data-type="false" :data-upgrade="false"></tiny-fluent-editor>
内容:<br />
{{ value }}
</div>
<tiny-fluent-editor v-model="value" :data-type="false" :data-upgrade="false"></tiny-fluent-editor>
</template>

<script setup>
Expand Down
6 changes: 1 addition & 5 deletions examples/sites/demos/pc/app/fluent-editor/data-switch.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<template>
<div>
<tiny-fluent-editor v-model="value" :data-type="false" :data-upgrade="false"></tiny-fluent-editor>
内容:<br />
{{ value }}
</div>
<tiny-fluent-editor v-model="value" :data-type="false" :data-upgrade="false"></tiny-fluent-editor>
</template>

<script>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<template>
<div>
<tiny-fluent-editor v-model="content" disabled></tiny-fluent-editor>
</div>
<tiny-fluent-editor v-model="content" disabled></tiny-fluent-editor>
</template>

<script setup>
Expand Down
4 changes: 1 addition & 3 deletions examples/sites/demos/pc/app/fluent-editor/disabled.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<template>
<div>
<tiny-fluent-editor v-model="content" disabled></tiny-fluent-editor>
</div>
<tiny-fluent-editor v-model="content" disabled></tiny-fluent-editor>
</template>

<script>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<template>
<div>
<tiny-fluent-editor v-model="content" :image-upload="imageUpload"></tiny-fluent-editor>
内容:<br />
{{ content }}
</div>
<tiny-fluent-editor v-model="content" :image-upload="imageUpload"></tiny-fluent-editor>
</template>

<script setup>
Expand Down
6 changes: 1 addition & 5 deletions examples/sites/demos/pc/app/fluent-editor/image-upload.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<template>
<div>
<tiny-fluent-editor v-model="content" :image-upload="imageUpload"></tiny-fluent-editor>
内容:<br />
{{ content }}
</div>
<tiny-fluent-editor v-model="content" :image-upload="imageUpload"></tiny-fluent-editor>
</template>

<script>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<template>
<div>
<tiny-fluent-editor v-model="content" :options="options"></tiny-fluent-editor>
内容:<br />
{{ content }}
</div>
<tiny-fluent-editor v-model="content" :options="options"></tiny-fluent-editor>
</template>

<script setup>
Expand Down
6 changes: 1 addition & 5 deletions examples/sites/demos/pc/app/fluent-editor/options.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<template>
<div>
<tiny-fluent-editor v-model="content" :options="options"></tiny-fluent-editor>
内容:<br />
{{ content }}
</div>
<tiny-fluent-editor v-model="content" :options="options"></tiny-fluent-editor>
</template>

<script>
Expand Down

0 comments on commit 1b2de8e

Please sign in to comment.