Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
CambPr opened this issue Jun 9, 2023 · 6 comments
Open

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

CambPr opened this issue Jun 9, 2023 · 6 comments
Labels

Comments

@CambPr
Copy link

CambPr commented Jun 9, 2023

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.

Copy link

Ref: INT-3189

@CambPr
Copy link
Author

CambPr commented Jun 9, 2023

What does Ref: INT-3189 reference to?

@Derkyela
Copy link

@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 #369 (comment).

@newalway
Copy link

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
Copy link

Pezhvak commented Oct 28, 2023

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

@okaroir
Copy link

okaroir commented Jan 3, 2024

??????

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants