tinymce / tinymce-vue

Official TinyMCE Vue component
MIT License
2.08k stars 208 forks source link

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

Closed CambPr closed 4 months 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 1 year 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 1 year 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 1 year ago

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

okaroir commented 10 months ago

??????

tiny-stale-bot commented 4 months ago

This issue is stale because it has been open 30 days with no activity. Please comment if you wish to keep this issue open or it will be closed in 7 days.

tiny-stale-bot commented 4 months ago

This issue was closed because it has been stalled for 7 days with no activity.