calin24
calin24

Reputation: 991

How to bundle TinyMCE vue integration?

I want to use tinymce vue in my laravel vue SPA app (Laravel 6 and [email protected])

I want to bundle in the app.js and app.css all the content. After I installed :

npm install tinymce
npm install @tinymce/tinymce-vue

I have imported globally app.js:

import Vue from 'vue';
import VueRouter from 'vue-router';

import Editor from '@tinymce/tinymce-vue';
import 'tinymce/tinymce.min';
import 'tinymce/themes/silver/theme.min'

Vue.component('tinymce-editor', Editor);

...

and in app.scss:

@import '~tinymce/skins/ui/oxide/skin.min.css';
@import '~tinymce/skins/ui/oxide/content.min.css';
@import '~tinymce/skins/content/default/content.min.css';

It compiles fine...but when I load the component that contains the editor

<tinymce-editor></tinymce-editor>

it complains in the browser console (404) that it cannot find the css files that I have imported in the app.scss

What am I missing ???

Upvotes: 2

Views: 1025

Answers (1)

keyboardSmasher
keyboardSmasher

Reputation: 2811

You have to tell tinymce that it doesn't need to worry about those files.

<tinymce-editor
  :init="{content_css: false, skin: false}"
>
</tinymce-editor>

Upvotes: 1

Related Questions