add rich text editor
Replace the admin rich text textarea with a Tiptap editor while keeping the existing HTML string save contract. Add public-page styles for the editor output.
This commit is contained in:
parent
cdc29b795a
commit
b4b3927ab1
5 changed files with 1735 additions and 13 deletions
|
|
@ -2,6 +2,7 @@
|
|||
import { storeToRefs } from 'pinia'
|
||||
import { computed, reactive, ref, watch } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import RichTextEditor from '@/components/RichTextEditor.vue'
|
||||
import SiteHeader from '@/components/SiteHeader.vue'
|
||||
import { useElementsStore } from '@/stores/elements'
|
||||
|
||||
|
|
@ -325,15 +326,10 @@ function resetInput(changeEvent: Event): void {
|
|||
</p>
|
||||
</section>
|
||||
|
||||
<label class="admin-element-page__field">
|
||||
<span class="admin-element-page__label">Rich Text HTML</span>
|
||||
<textarea
|
||||
v-model="form.richText"
|
||||
class="admin-element-page__textarea admin-element-page__code"
|
||||
data-cy="admin-element-rich-text"
|
||||
rows="9"
|
||||
/>
|
||||
</label>
|
||||
<div class="admin-element-page__field">
|
||||
<span class="admin-element-page__label">Rich Text</span>
|
||||
<RichTextEditor v-model="form.richText" :disabled="isSaving" />
|
||||
</div>
|
||||
|
||||
<section class="admin-element-page__media-field">
|
||||
<span class="admin-element-page__label">Short PDF</span>
|
||||
|
|
@ -559,10 +555,6 @@ function resetInput(changeEvent: Event): void {
|
|||
resize: vertical;
|
||||
}
|
||||
|
||||
.admin-element-page__code {
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
||||
}
|
||||
|
||||
.admin-element-page__icon-preview {
|
||||
width: 6rem;
|
||||
height: 6rem;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue