fix(components): point tinymce component to local installation
tiny.dick has caught up to us unfortunately :/
This commit is contained in:
parent
90b0256008
commit
dd30f08d9a
@ -1,9 +1,9 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import TinymceEditor from "@tinymce/tinymce-vue"
|
import TinymceEditor from "@tinymce/tinymce-vue";
|
||||||
import {useDark} from "@vueuse/core"
|
import { useDark } from "@vueuse/core";
|
||||||
import { NamePath } from "ant-design-vue/es/form/interface";
|
import { NamePath } from "ant-design-vue/es/form/interface";
|
||||||
import {Field as VeeField} from "vee-validate"
|
import { Field as VeeField } from "vee-validate";
|
||||||
import tinymce from "tinymce"
|
import tinymce from "tinymce";
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
name: string;
|
name: string;
|
||||||
init: any;
|
init: any;
|
||||||
@ -16,12 +16,29 @@ import {Field as VeeField} from "vee-validate"
|
|||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<ClientOnly>
|
<ClientOnly>
|
||||||
<vee-field :name="props.name" v-slot="{errorMessage, field, value}" :value="val">
|
<vee-field
|
||||||
<a-form-item :validate-status="!!errorMessage ? 'error' : undefined" :name="props.name" :label="props.label" :value="val">
|
:name="props.name"
|
||||||
<tinymce-editor v-bind="field" width="100%" cloud-channel="6-dev" api-key="qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc"
|
v-slot="{ errorMessage, field, value }"
|
||||||
:init="{...props.init,
|
:model-value="props.val"
|
||||||
skin: props.dark ? 'oxide-dark' : 'oxide',
|
>
|
||||||
content_css: props.dark ? 'dark' : 'default'}"/>
|
<a-form-item
|
||||||
|
:validate-status="!!errorMessage ? 'error' : undefined"
|
||||||
|
:name="props.name"
|
||||||
|
:label="props.label"
|
||||||
|
:help="errorMessage"
|
||||||
|
>
|
||||||
|
<tinymce-editor
|
||||||
|
v-bind="field"
|
||||||
|
width="100%"
|
||||||
|
:initial-value="value"
|
||||||
|
v-model:model-value="field.value"
|
||||||
|
tinymce-script-src="/tinymce/js/tinymce/tinymce.min.js"
|
||||||
|
:init="{
|
||||||
|
...props.init,
|
||||||
|
skin: dark ? 'oxide-dark' : 'oxide',
|
||||||
|
content_css: dark ? 'dark' : 'default',
|
||||||
|
}"
|
||||||
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</vee-field>
|
</vee-field>
|
||||||
</ClientOnly>
|
</ClientOnly>
|
||||||
|
Loading…
Reference in New Issue
Block a user