Skip to content

Vue2Editor 2.0

Compare
Choose a tag to compare
@davidroyer davidroyer released this 07 Apr 01:09
· 344 commits to master since this release

Vue2Editor 2.0

Vue2Editor was having some issues keeping the content in sync between parent and the editor. Therefore, it has been restructured to provide an easier process of using the editor with any project.

It now uses v-model, which should make it significantly easier to understand the flow of data and keep it in sync between the parent scope and the scope of the editor.

Example:

<template>
   <div id="app">
     <vue-editor v-model="content"></vue-editor>
   </div>
 </template>

 <script>
   import { VueEditor } from 'vue2-editor'

   components: {
     VueEditor
   },

   export default {
     data: function() {
       return {
         content: '<h1>Some initial content</h1>'  
       }
     }
   }
 </script>

Updates

Since v-model is being now being used, a lot of the features such as the live preview and the save button that were included are no longer part of Vue2Editor.

Note: The examples in the README have been updated to demonstrate how to achieve these same features as before with Vue2Editor 2.0

Special thanks to @Christilut for his merge proposal that helped me understand this more efficient and user-friendly approach!