tinymce-vue icon indicating copy to clipboard operation
tinymce-vue copied to clipboard

Laravel 10 + Vue 3 + Vite + Self hosted

Open CambPr opened this issue 1 year ago • 6 comments

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:

  • npm install tinymce @tinymce/tinymce-vue
  • In my Vue-file
<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.

CambPr avatar Jun 09 '23 08:06 CambPr

Ref: INT-3189

TinyITAdmin avatar Jun 09 '23 08:06 TinyITAdmin

What does Ref: INT-3189 reference to?

CambPr avatar Jun 09 '23 08:06 CambPr

@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.

Derkyela avatar Aug 27 '23 15:08 Derkyela

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>

newalway avatar Sep 19 '23 08:09 newalway

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

Pezhvak avatar Oct 28 '23 09:10 Pezhvak

??????

okaroir avatar Jan 03 '24 12:01 okaroir

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 avatar Jul 09 '24 00:07 tiny-stale-bot

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

tiny-stale-bot avatar Jul 16 '24 00:07 tiny-stale-bot