matthiascw
1609
7
Vue

Run TinyMCE with Vue

Posted 2 years ago by matthiascw

Hello

I am trying to run the WYSIWYG Editor TinyMCE with vue.

This is my html (inside vue component)

<textarea v-tinymce id="tiny" class="form-control" rows="6" placeholder="Text" name="body" v-model="body"></textarea>

This is the code which should initialize TinyMCE

  import tinymce from 'tinymce';

  Vue.directive('tinymce', {
    bind() {'' +
      console.log(tinymce);
      tinymce.init({
          selector: '#tiny',
          theme: 'modern'
      });
    }
  });

However the console.log(tinymce); returns the right tinymce object but it's not rendered. I just get a simple bootstrap textarea.

How can I get the editor to work in vue?

Please sign in or create an account to participate in this conversation.