vue-froala-wysiwyg is an official Vue.js component that provides bindings for the Froala WYSIWYG HTML rich text editor. Currently at version 5.1.0, this package is specifically designed for Vue 3.x applications and integrates with Froala Editor version 3. It receives active maintenance with frequent patch releases addressing bug fixes, and periodic minor releases introducing new features like page breaks, export to Word, and enhanced table functionalities. A key differentiator is that the underlying Froala Editor is a commercial product known for its extensive feature set, mobile-first design, and enterprise-grade capabilities, requiring a license for production use. This wrapper simplifies the integration of the feature-rich Froala editor into Vue projects, handling component lifecycle and data binding.
npm install vue-froala-wysiwygVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to set up `vue-froala-wysiwyg` in a Vue 3 application, including global registration, importing necessary Froala Editor assets, and basic component usage with data binding and configuration.
Ensure your project is running Vue 3.x. For new projects, always start with Vue 3. For existing Vue 2 projects, consider migrating to Vue 3 or using an older compatible version of this package if available.
Purchase an appropriate Froala Editor license from the official website. The license key should then be passed in the editor's configuration object. For example: `{ licenseKey: 'YOUR_LICENSE_KEY' }`.Add `import 'froala-editor/js/plugins.pkgd.min.js';`, `import 'froala-editor/css/froala_editor.pkgd.min.css';`, and `import 'froala-editor/css/froala_style.min.css';` to your main JavaScript entry file (e.g., `main.js` or `App.vue`). Ensure your build system (Webpack, Vite) is configured to handle CSS imports correctly.
Use `immediateVueModelUpdate: false` (the default) unless real-time binding is absolutely critical and performance is not a concern. The model will still update on editor blur or when the editor's internal change events fire, which is often sufficient.
Ensure `app.use(VueFroala);` is called in your main application entry point (e.g., `main.js` for global registration). If using it locally in a component, you would need to import and register it in that component's `components` option, e.g., `import { FroalaEditorComponent } from 'vue-froala-wysiwyg'; components: { FroalaEditorComponent }`.Verify that `import 'froala-editor/js/plugins.pkgd.min.js';` (and any other necessary Froala JS files) is present and executed *before* your Vue application mounts or attempts to render the Froala component. Ordering of imports matters.
Obtain a valid Froala Editor license. Pass the `licenseKey` in the `config` prop of the `<froala>` component, for example: `:config="{ licenseKey: 'YOUR_LICENSE_KEY' }"`. Ensure the key matches the domain and usage rights of your application.Ensure `import 'froala-editor/css/froala_editor.pkgd.min.css';` and `import 'froala-editor/css/froala_style.min.css';` are present in your JavaScript entry file. Verify that your `webpack.config.js` or `vite.config.js` includes appropriate loaders (e.g., `style-loader`, `css-loader`, PostCSS, Sass loaders if applicable) for `.css` files.