From 3c987589698fdaae78b43f87aafc80cdb2bb84a3 Mon Sep 17 00:00:00 2001 From: Ryan Worth Date: Wed, 23 Aug 2017 11:17:41 +1000 Subject: [PATCH] Make use section clearer Should help resolve issues #1 and #3 --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 48edaf3..1cf0279 100644 --- a/README.md +++ b/README.md @@ -21,12 +21,34 @@ npm install vue-tinymce --save ``` ### Use +If you have tinymce already loaded into your `` ```javascript import Vue from 'vue' import VueTinymce from 'vue-tinymce' Vue.use(VueTinymce) ``` +Or you can import tinymce using javascript. First run `npm install tinymce --save` +```javascript +import Vue from 'vue' +import VueTinymce from 'vue-tinymce' + +// Import TinyMCE +import tinymce from 'tinymce/tinymce' + +// A theme is also required +import 'tinymce/themes/modern/theme' + +// Any plugins you want to use have to be imported +import 'tinymce/plugins/paste' +import 'tinymce/plugins/link' + +Vue.use(VueTinymce) +``` +Also need the skin for tinymce to be copied to your public/build directory and the url set in the options of the component. +See [Getting the skin](https://www.tinymce.com/docs/advanced/usage-with-module-loaders/#gettingtheskin) +and [`skin_url` option](https://www.tinymce.com/docs/configure/editor-appearance/#skin_url) + ### Vue template ```html