tinymce / tinymce-vue

Official TinyMCE Vue component
MIT License
2.01k stars 202 forks source link

Laravel 10 + Vue 3 + Vite + Self hosted #383

Open CambPr opened 1 year ago

CambPr commented 1 year ago

I would like to use the self-hosted version of tinymce in my Laravel 10 application using Vue 3 and Vite.

Here is what I did:

<script setup>
import Editor from '@tinymce/tinymce-vue';
...
</script>

<template>
<Editor .../>
...
</template>

Problem: The wrapper always loads tinymce from cdn instead from the local installation. It is not clear to me, on how this could be fixed.

Do I have to use the tinymce-script-src option? If so, how do I have to configure Vite to copy tinymce.min.js to public? And which path do I have to specify?

Thanks for any hint.

TinyITAdmin commented 1 year ago

Ref: INT-3189

CambPr commented 1 year ago

What does Ref: INT-3189 reference to?

Derkyela commented 10 months ago

@CambPr this helped me: https://forum.vite.net/topic/5753/using-tinymcs-wysiwig-editor/2

I just imported everything into my app.js then it does not load tiny via cdn. Alternatively you could try https://github.com/tinymce/tinymce-vue/issues/369#issuecomment-1480676674.

newalway commented 9 months ago

composition api can use

<script setup>
import { defineAsyncComponent , h, ref ,inject,watch ,provide,computed } from 'vue'
const Editor = defineAsyncComponent(() => import ('@tinymce/tinymce-vue'))
</script>
<template>
<Editor .../>
...
</template>
Pezhvak commented 8 months ago

If anyone else had this issue, just import tinymce before importing the component.

okaroir commented 6 months ago

??????