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

Upgrade to Vue 3 #170

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/vue-froala-wysiwyg.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@ import 'froala-editor/css/froala_editor.pkgd.min.css';

// 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')
let VueApp = createApp({
render: () => h(App)
});

VueApp.use(VueFroala);

VueApp.mount('#app');

```

Expand All @@ -60,8 +61,6 @@ new Vue({
</template>

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

export default {
name: 'app',
data () {
Expand Down Expand Up @@ -292,12 +291,12 @@ The object received by the function will contain the following methods:

## Displaying HTML

To display content created with the froala editor use the `froalaView` component.
To display content created with the froala editor use the `froala-view` component.

```javascript
<froala v-model="content"></froala>

<froalaView v-model="content"></froalaView>
<froala-view v-model="content"></froala-view>
```


Expand Down
5 changes: 3 additions & 2 deletions build/webpack.base.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var config = require('../config')
var webpack = require('webpack')
var utils = require('./utils')
var projectRoot = path.resolve(__dirname, '../')
const VueLoaderPlugin = require('vue-loader/lib/plugin');
const { VueLoaderPlugin } = require('vue-loader');
module.exports = {
entry: {
main: './src/main.js',
Expand Down Expand Up @@ -35,7 +35,8 @@ module.exports = {
},
{
test: /\.json$/,
loader: 'json-loader'
use: ['json-loader'],
type: 'javascript/auto'
},
{
test: /\.html$/,
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-froala-wysiwyg",
"version": "3.2.6-1",
"version": "4.0.0",
"description": "Vue plugin for Froala WYSIWYG HTML rich text editor.",
"author": "Froala Labs (https://www.froala.com/)",
"license": "https://froala.com/wysiwyg-editor/terms/",
Expand Down Expand Up @@ -43,17 +43,17 @@
"babel-runtime": "^6.26.0",
"@babel/runtime-corejs2": "^7.7.7",
"froala-editor": "^3.2.6-1",
"vue": "2.6.6"
"vue": "^3.0.0"
},
"devDependencies": {
"@babel/cli": "^7.2.3",
"@babel/core": "^7.3.4",
"@babel/core": "^7.4.0",
"@babel/helpers": "^7.3.1",
"@babel/plugin-transform-runtime": "^7.3.4",
"@babel/polyfill": "^7.2.5",
"@babel/preset-env": "^7.3.4",
"@babel/runtime": "^7.3.4",
"@babel/runtime-corejs2": "^7.3.4",
"@vue/compiler-sfc": "^3.0.7",
"babel-helpers": "^6.24.1",
"babel-loader": "^8.0.5",
"connect-history-api-fallback": "^1.1.0",
Expand All @@ -79,7 +79,7 @@
"url-loader": "^1.1.2",
"vue-hot-reload-api": "^2.0.11",
"vue-html-loader": "^1.2.4",
"vue-loader": "15.6.2",
"vue-loader": "^16.1.2",
"vue-style-loader": "^4.1.2",
"vue-template-compiler": "2.6.6",
"webpack": "^4.29.3",
Expand Down
12 changes: 7 additions & 5 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ import 'froala-editor/css/froala_style.min.css';
import 'froala-editor/js/plugins.pkgd.min.js';

import App from './examples/App'
import Vue from 'vue'
import { createApp, h } from 'vue'
import VueFroala from 'src';

Vue.use(VueFroala);
new Vue({
render: h => h(App)
let VueApp = createApp({
render: () => h(App)
});

}).$mount('#app')
VueApp.use(VueFroala);

VueApp.mount('#app');
Loading