Top Related Projects
The world's #1 JavaScript library for rich text editing. Available for React, Vue and Angular
Powerful rich text editor framework with a modular architecture, modern integrations, and features like collaborative editing.
Quill is a modern WYSIWYG editor built for compatibility and extensibility
Super simple WYSIWYG editor
Medium.com WYSIWYG editor clone. Uses contenteditable API to implement a rich text solution.
A React framework for building text editors.
Quick Overview
Froala WYSIWYG Editor is a powerful and lightweight JavaScript rich text editor for web applications. It offers a modern, customizable interface with a wide range of features, making it suitable for various content creation and editing tasks.
Pros
- Rich feature set, including image manipulation, video embedding, and table creation
- Highly customizable with numerous plugins and configuration options
- Mobile-friendly and responsive design
- Extensive documentation and good community support
Cons
- Commercial license required for most use cases
- Learning curve can be steep for advanced customizations
- Some users report occasional performance issues with large documents
- Limited free version with restricted features
Code Examples
- Basic initialization:
new FroalaEditor('#editor');
- Customizing toolbar buttons:
new FroalaEditor('#editor', {
toolbarButtons: ['bold', 'italic', 'underline', 'paragraphFormat', 'align']
});
- Handling events:
new FroalaEditor('#editor', {
events: {
'contentChanged': function () {
console.log('Content changed');
},
'focus': function () {
console.log('Editor is focused');
}
}
});
- Adding custom buttons:
FroalaEditor.DefineIcon('alert', {NAME: 'info', SVG_KEY: 'help'});
FroalaEditor.RegisterCommand('alert', {
title: 'Alert',
focus: false,
undo: false,
refreshAfterCallback: false,
callback: function () {
alert('Hello!');
}
});
new FroalaEditor('#editor', {
toolbarButtons: ['bold', 'italic', 'underline', '|', 'alert']
});
Getting Started
- Include Froala Editor files in your HTML:
<link href="https://cdn.jsdelivr.net/npm/froala-editor@latest/css/froala_editor.pkgd.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/froala-editor@latest/js/froala_editor.pkgd.min.js"></script>
- Create a container element:
<textarea id="editor"></textarea>
- Initialize the editor:
new FroalaEditor('#editor');
This will create a basic Froala Editor instance with default options. You can customize it further by passing configuration options to the constructor.
Competitor Comparisons
The world's #1 JavaScript library for rich text editing. Available for React, Vue and Angular
Pros of TinyMCE
- More extensive documentation and community support
- Wider range of plugins and customization options
- Better accessibility features and compliance with WCAG standards
Cons of TinyMCE
- Larger file size, which may impact page load times
- Steeper learning curve for advanced customization
- Some advanced features require a paid license
Code Comparison
TinyMCE initialization:
tinymce.init({
selector: 'textarea',
plugins: 'advlist autolink lists link image charmap print preview anchor',
toolbar: 'undo redo | formatselect | bold italic | alignleft aligncenter alignright | bullist numlist outdent indent | link image'
});
Froala initialization:
new FroalaEditor('#editor', {
toolbarButtons: ['bold', 'italic', 'underline', 'strikeThrough', '|', 'paragraphFormat', 'align', 'formatOL', 'formatUL', '|', 'insertLink', 'insertImage', 'insertTable'],
pluginsEnabled: ['align', 'charCounter', 'codeBeautifier', 'codeView', 'colors', 'draggable', 'emoticons', 'entities', 'file', 'fontFamily', 'fontSize', 'fullscreen', 'image', 'imageManager', 'inlineStyle', 'lineBreaker', 'link', 'lists', 'paragraphFormat', 'paragraphStyle', 'quickInsert', 'quote', 'save', 'table', 'url', 'video', 'wordPaste']
});
Both editors offer rich text editing capabilities, but TinyMCE provides more out-of-the-box features and customization options, while Froala focuses on a simpler, more lightweight approach.
Powerful rich text editor framework with a modular architecture, modern integrations, and features like collaborative editing.
Pros of CKEditor 5
- Open-source with a more permissive license (GPL-2.0)
- Larger community and more frequent updates
- Extensive documentation and learning resources
Cons of CKEditor 5
- Steeper learning curve for customization
- Larger file size, which may impact page load times
Code Comparison
CKEditor 5:
import ClassicEditor from '@ckeditor/ckeditor5-build-classic';
ClassicEditor
.create(document.querySelector('#editor'))
.then(editor => {
console.log('Editor was initialized', editor);
})
.catch(error => {
console.error(error);
});
Froala Editor:
new FroalaEditor('#editor', {
toolbarButtons: ['bold', 'italic', 'underline'],
events: {
'initialized': function() {
console.log('Editor was initialized');
}
}
});
Both editors offer rich text editing capabilities, but CKEditor 5 provides a more modular approach with its plugin system. Froala Editor, on the other hand, offers a simpler initialization process and easier customization for basic use cases. CKEditor 5's open-source nature and larger community support make it a popular choice for developers who prioritize flexibility and long-term maintainability, while Froala Editor might be preferred for its ease of use and commercial support options.
Quill is a modern WYSIWYG editor built for compatibility and extensibility
Pros of Quill
- Open-source and free to use, unlike Froala which requires a license
- Modular architecture allows for easy customization and extension
- Smaller file size and faster loading times
Cons of Quill
- Less extensive feature set compared to Froala's rich functionality
- Limited built-in UI components and themes
- Steeper learning curve for advanced customizations
Code Comparison
Quill initialization:
var quill = new Quill('#editor', {
theme: 'snow'
});
Froala initialization:
new FroalaEditor('#editor', {
toolbarButtons: ['bold', 'italic', 'underline']
});
Both editors offer simple initialization, but Froala provides more built-in options for toolbar customization out of the box. Quill requires additional modules or custom code for similar functionality.
Quill focuses on a lean core with modular extensions, while Froala offers a more comprehensive set of features by default. The choice between them depends on specific project requirements, budget constraints, and desired level of customization.
Super simple WYSIWYG editor
Pros of Summernote
- Open-source and free to use, unlike Froala which requires a license
- Lightweight and easy to integrate with minimal dependencies
- Extensive documentation and active community support
Cons of Summernote
- Less feature-rich compared to Froala's advanced capabilities
- May require more custom development for complex use cases
- Limited built-in UI customization options
Code Comparison
Summernote initialization:
$('#summernote').summernote({
height: 300,
toolbar: [
['style', ['bold', 'italic', 'underline', 'clear']],
['font', ['strikethrough', 'superscript', 'subscript']]
]
});
Froala initialization:
new FroalaEditor('#editor', {
height: 300,
toolbarButtons: [
'bold', 'italic', 'underline', 'strikeThrough', 'subscript', 'superscript'
]
});
Both editors offer similar basic initialization, but Froala provides more advanced configuration options and features out of the box. Summernote's simplicity makes it easier to set up for basic use cases, while Froala's extensive API allows for more complex implementations and customizations.
Medium.com WYSIWYG editor clone. Uses contenteditable API to implement a rich text solution.
Pros of medium-editor
- Open-source and free to use, unlike the commercial Froala editor
- Lightweight and minimalistic, with a smaller footprint than Froala
- Highly customizable and extensible through plugins and custom extensions
Cons of medium-editor
- Less feature-rich out of the box compared to Froala's comprehensive toolkit
- Limited official documentation and support compared to Froala's extensive resources
- May require more setup and configuration for advanced features
Code Comparison
medium-editor:
var editor = new MediumEditor('.editable', {
toolbar: {
buttons: ['bold', 'italic', 'underline', 'anchor', 'h2', 'h3', 'quote']
},
placeholder: {
text: 'Type your text'
}
});
Froala:
new FroalaEditor('#editor', {
toolbarButtons: ['bold', 'italic', 'underline', 'insertLink', 'insertImage', 'insertTable'],
placeholderText: 'Type your text here',
imageUploadURL: 'upload_image.php'
});
Both editors offer similar basic functionality, but Froala provides more built-in features like image upload handling. medium-editor focuses on simplicity and customization, while Froala offers a more comprehensive solution out of the box.
A React framework for building text editors.
Pros of Draft.js
- Open-source and maintained by Facebook, ensuring high-quality code and community support
- Highly customizable and extensible, allowing developers to create complex editing experiences
- Built with React, making it easy to integrate into React-based applications
Cons of Draft.js
- Steeper learning curve compared to WYSIWYG Editor, requiring more time to implement basic functionality
- Less out-of-the-box features and styling options, potentially requiring more development effort
- Limited browser compatibility, especially for older versions of Internet Explorer
Code Comparison
Draft.js:
import { Editor, EditorState } from 'draft-js';
const [editorState, setEditorState] = useState(EditorState.createEmpty());
<Editor editorState={editorState} onChange={setEditorState} />
WYSIWYG Editor:
<textarea id="editor">
<p>Your content here</p>
</textarea>
<script>
new FroalaEditor('#editor');
</script>
The Draft.js example shows a basic React implementation, while the WYSIWYG Editor example demonstrates a simpler HTML and JavaScript setup. Draft.js requires more configuration but offers greater flexibility, whereas WYSIWYG Editor provides a more straightforward implementation with pre-built features.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Froala Editor V4
Froala WYSIWYG HTML Editor is one of the most powerful JavaScript rich text editors ever.
- Slim - only add the plugins that you need (30+ official plugins)
- Client frameworks integrations
- Server side SDKs for PHP, Node.JS, .NET, Java, and Python
- Code is well commented
- Online documentation up to date
- Simple to extend - the plugins are all well commented and simple to use as a basis for your own plugins
- Well maintained - frequent releases
- Great support - Help Center
- Awesome new features â
Demos
- Basic demo: https://www.froala.com/wysiwyg-editor
- Inline demo: https://www.froala.com/wysiwyg-editor/inline
- Full list: https://www.froala.com/wysiwyg-editor/examples
Download and Install Froala Editor
Install from npm
npm install froala-editor
Install from bower
bower install froala-wysiwyg-editor
Load from CDN
Using Froala Editor from CDN is the easiest way to install it and we recommend using the jsDeliver CDN as it mirrors the NPM package.
<!-- Include Editor style. -->
<link href="https://cdn.jsdelivr.net/npm/froala-editor@latest/css/froala_editor.pkgd.min.css" rel="stylesheet" type="text/css" />
<!-- Create a tag that we will use as the editable area. -->
<!-- You can use a div tag as well. -->
<textarea></textarea>
<!-- Include Editor JS files. -->
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/froala-editor@latest/js/froala_editor.pkgd.min.js"></script>
<!-- Initialize the editor. -->
<script>
new FroalaEditor('textarea');
</script>
Load from CDN as an AMD module
Froala Editor is compatible with AMD module loaders such as RequireJS. The following example shows how to load it along with the Algin plugin from CDN using RequireJS.
<html>
<head>
<!-- Load CSS files. -->
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/froala-editor@latest/css/froala_editor.css">
<script src="require.js"></script>
<script>
require.config({
packages: [{
name: 'froala-editor',
main: 'js/froala_editor.min'
}],
paths: {
// Change this to your server if you do not wish to use our CDN.
'froala-editor': 'https://cdn.jsdelivr.net/npm/froala-editor@latest'
}
});
</script>
<style>
body {
text-align: center;
}
div#editor {
width: 81%;
margin: auto;
text-align: left;
}
.ss {
background-color: red;
}
</style>
</head>
<body>
<div id="editor">
<div id='edit' style='margin-top:30px;'>
</div>
</div>
<script>
require([
'froala-editor',
'froala-editor/js/plugins/align.min'
], function(FroalaEditor) {
new FroalaEditor('#edit')
});
</script>
</body>
</html>
Load Froala Editor as a CommonJS Module
Froala Editor is using an UMD module pattern, as a result it has support for CommonJS. The following examples presumes you are using npm to install froala-editor, see Download and install FroalaEditor for more details.
var FroalaEditor = require('froala-editor');
// Load a plugin.
require('froala-editor/js/plugins/align.min');
// Initialize editor.
new FroalaEditor('#edit');
Load Froala Editor as a transpiled ES6/UMD module
Since Froala Editor supports ES6 (ESM - ECMAScript modules) and UMD (AMD, CommonJS), it can be also loaded as a module with the use of transpilers. E.g. Babel, Typescript. The following examples presumes you are using npm to install froala-editor, see Download and install FroalaEditor for more details.
import FroalaEditor from 'froala-editor'
// Load a plugin.
import 'froala-editor/js/plugins/align.min.js'
// Initialize editor.
new FroalaEditor('#edit')
For more details on customizing the editor, please check the editor documentation.
Use with your existing framework
- Angular JS: https://github.com/froala/angular-froala
- Angular 2: https://github.com/froala/angular2-froala-wysiwyg
- Aurelia: https://github.com/froala/aurelia-froala-editor
- CakePHP: https://github.com/froala/wysiwyg-cake
- Craft 2 CMS: https://github.com/froala/Craft-Froala-WYSIWYG
- Craft 3 CMS: https://github.com/froala/Craft-3-Froala-WYSIWYG
- Django: https://github.com/froala/django-froala-editor
- Ember: https://github.com/froala/ember-froala-editor
- Knockout: https://github.com/froala/knockout-froala
- Meteor: https://github.com/froala/meteor-froala
- Ruby on Rails: https://github.com/froala/wysiwyg-rails
- React JS: https://github.com/froala/react-froala-wysiwyg/
- Reactive: https://github.com/froala/froala-reactive
- Symfony: https://github.com/froala/KMSFroalaEditorBundle
- Vue JS: https://github.com/froala/vue-froala-wysiwyg/
- Yii2: https://github.com/froala/yii2-froala-editor
- Wordpress: https://github.com/froala/wordpress-froala-wysiwyg
Browser Support
At present, we officially aim to support the last two versions of the following browsers:
- Chrome
- Edge
- Firefox
- Safari
- Opera
- Internet Explorer 11
- Safari iOS
- Chrome, Firefox and Default Browser Android
Resources
- Demo: www.froala.com/wysiwyg-editor
- Download Page: www.froala.com/wysiwyg-editor/download
- Documentation: froala.com/wysiwyg-editor/docs
- License Agreement: www.froala.com/wysiwyg-editor/terms
- Support: wysiwyg-editor.froala.help
- Roadmap & Feature Requests: https://wysiwyg-editor-roadmap.froala.com
- Issues Repo guidelines
Reporting Issues
We use GitHub Issues as the official bug tracker for the Froala WYSIWYG HTML Editor. Here are some advices for our users that want to report an issue:
- Make sure that you are using the latest version of the Froala WYSIWYG Editor. The issue that you are about to report may be already fixed in the latest master branch version: https://github.com/froala/froala-wysiwyg/tree/master/js.
- Providing us reproducible steps for the issue will shorten the time it takes for it to be fixed. A JSFiddle is always welcomed, and you can start from this basic one.
- Some issues may be browser specific, so specifying in what browser you encountered the issue might help.
Technical Support or Questions
If you have questions or need help integrating the editor please contact us instead of opening an issue.
Licensing
In order to use the Froala Editor you have to purchase one of the following licenses according to your needs. You can find more about that on our website on the pricing plan page.
Top Related Projects
The world's #1 JavaScript library for rich text editing. Available for React, Vue and Angular
Powerful rich text editor framework with a modular architecture, modern integrations, and features like collaborative editing.
Quill is a modern WYSIWYG editor built for compatibility and extensibility
Super simple WYSIWYG editor
Medium.com WYSIWYG editor clone. Uses contenteditable API to implement a rich text solution.
A React framework for building text editors.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot