Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 17 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,36 @@ Install `vue-froala-wysiwyg` from `npm`
npm install vue-froala-wysiwyg --save
```

Install babel dependency

```
npm install --save --dev @babel/runtime-corejs2
```

## Integration

#### 1. Require and use Froala Editor component inside your application.

#### main.js file:
```javascript
//Import Froala Editor
import 'froala-editor/js/plugins.pkgd.min.js';
// Import Froala Editor css files.
import 'froala-editor/css/froala_editor.pkgd.min.css';

// Import third party plugins
import 'froala-editor/js/third_party/embedly.min';
import 'froala-editor/js/third_party/font_awesome.min';
import 'froala-editor/js/third_party/spell_checker.min';
import 'froala-editor/js/third_party/image_tui.min';
// Import and use Vue Froala lib.
import VueFroala from 'vue-froala-wysiwyg'
Vue.use(VueFroala)
Vue.config.productionTip = false

new Vue({
render: h => h(App),

}).$mount('#app')
```

#### App.vue file:
Expand All @@ -46,7 +62,6 @@ Vue.use(VueFroala)
</template>

<script>
import VueFroala from 'vue-froala-wysiwyg';

export default {
name: 'app',
Expand All @@ -66,40 +81,6 @@ export default {
</script>
```



#### 2. Make sure you have the right Webpack settings for loading the CSS files.

```javascript
var webpack = require('webpack')
var path = require('path')

module.exports = {
module: {
loaders: [

// ...

// Css loader.
{
test: /\.css$/,
loader: 'vue-style-loader!css-loader'
}

]
},
vue: {
loaders: {

// ...

// Css loader for Webpack 1.x .
css: 'vue-style-loader!css-loader'
}
}
})
```

## Usage

### Initialize
Expand Down