Editor pt demo added

pull/3938/head
Tuğçe Küçükoğlu 2023-05-05 13:31:26 +03:00
parent e62e1cb5de
commit 80300daa8f
4 changed files with 127 additions and 3 deletions

73
doc/editor/pt/PTDoc.vue Normal file
View File

@ -0,0 +1,73 @@
<template>
<DocSectionText v-bind="$attrs"></DocSectionText>
<div class="card">
<Editor
v-model="value"
:pt="{
content: { style: { height: '320px' } },
toolbar: { class: 'surface-ground' }
}"
/>
</div>
<DocSectionCode :code="code" :dependencies="{ quill: '1.3.7' }" component="Editor" />
</template>
<script>
export default {
data() {
return {
value: '',
code: {
basic: `
<Editor
v-model="value"
:pt="{
content: { style: { height: '320px' } },
toolbar: { class: 'surface-ground' }
}"
/>`,
options: `
<template>
<div class="card">
<Editor
v-model="value"
:pt="{
content: { style: { height: '320px' } },
toolbar: { class: 'surface-ground' }
}"
/>
</div>
</template>
<script>
export default {
data() {
return {
value: ''
}
}
}
<\/script>`,
composition: `
<template>
<div class="card">
<Editor
v-model="value"
:pt="{
content: { style: { height: '320px' } },
toolbar: { class: 'surface-ground' }
}"
/>
</div>
</template>
<script setup>
import { ref } from "vue";
const value = ref('');
<\/script>`
}
};
}
};
</script>

View File

@ -0,0 +1,8 @@
<template>
<DocSectionText v-bind="$attrs">
<p>{{ $attrs.description }}</p>
</DocSectionText>
<div class="card">
<img class="w-full" src="https://primefaces.org/cdn/primevue/images/pt/wireframe-placeholder.jpg" />
</div>
</template>

41
doc/editor/pt/index.vue Normal file
View File

@ -0,0 +1,41 @@
<template>
<div class="doc-main">
<div class="doc-intro">
<h1>Editor Pass Through</h1>
</div>
<DocSections :docs="docs" />
</div>
<DocSectionNav :docs="docs" />
</template>
<script>
import DocApiTable from '@/components/doc/DocApiTable.vue';
import { getPTOption } from '@/components/doc/helpers/PTHelper.js';
import PtDoc from './PTDoc.vue';
import PTImage from './PTImage.vue';
export default {
data() {
return {
docs: [
{
id: 'pt.image',
label: 'Wireframe',
component: PTImage
},
{
id: 'pt.doc.editor',
label: 'Editor PT Options',
component: DocApiTable,
data: getPTOption('Editor')
},
{
id: 'pt.demo',
label: 'Demo',
component: PtDoc
}
]
};
}
};
</script>

View File

@ -1,16 +1,17 @@
<template>
<DocComponent title="Vue Editor Component" header="Editor" description="Editor is rich text editor component based on Quill." :componentDocs="docs" :apiDocs="['Editor']" />
<DocComponent title="Vue Editor Component" header="Editor" description="Editor is rich text editor component based on Quill." :componentDocs="docs" :apiDocs="['Editor']" :ptTabComponent="ptComponent" />
</template>
<script>
import AccessibilityDoc from '@/doc/editor/AccessibilityDoc.vue';
import BasicDoc from '@/doc/editor/BasicDoc.vue';
import VeeValidateDoc from '@/doc/editor/form/VeeValidateDoc.vue';
import ImportDoc from '@/doc/editor/ImportDoc.vue';
import QuillDoc from '@/doc/editor/QuillDoc.vue';
import ReadOnlyDoc from '@/doc/editor/ReadOnlyDoc.vue';
import StyleDoc from '@/doc/editor/StyleDoc.vue';
import TemplateDoc from '@/doc/editor/TemplateDoc.vue';
import VeeValidateDoc from '@/doc/editor/form/VeeValidateDoc.vue';
import PTComponent from '@/doc/editor/pt/index.vue';
export default {
data() {
@ -63,7 +64,8 @@ export default {
label: 'Accessibility',
component: AccessibilityDoc
}
]
],
ptComponent: PTComponent
};
}
};