What is tinymce?
TinyMCE is a powerful and flexible rich text editor that can be embedded in web applications. It provides a wide range of features for text formatting, media embedding, and content management.
What are tinymce's main functionalities?
Basic Text Formatting
This initializes TinyMCE on a textarea with the ID 'mytextarea', enabling basic text formatting options like bold, italic, underline, and more.
tinymce.init({ selector: '#mytextarea' });
Image and Media Embedding
This configuration allows users to embed images and media files into the text editor. The 'image' and 'media' plugins are included, and the toolbar is updated to include buttons for these functionalities.
tinymce.init({ selector: '#mytextarea', plugins: 'image media', toolbar: 'image media' });
Custom Toolbar
This example shows how to customize the toolbar with specific buttons for undo, redo, text styles, alignment, and indentation.
tinymce.init({ selector: '#mytextarea', toolbar: 'undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | outdent indent' });
Content Style Customization
This configuration customizes the content style within the editor, setting the font family and size for the text.
tinymce.init({ selector: '#mytextarea', content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }' });
Autosave Plugin
This example demonstrates the use of the 'autosave' plugin, which automatically saves the content at specified intervals (every 30 seconds in this case).
tinymce.init({ selector: '#mytextarea', plugins: 'autosave', autosave_interval: '30s' });
Other packages similar to tinymce
ckeditor4
CKEditor 4 is another popular rich text editor that offers a wide range of features similar to TinyMCE. It provides extensive customization options and a variety of plugins for different functionalities. CKEditor 4 is known for its robust performance and ease of integration.
quill
Quill is a modern rich text editor built for compatibility and extensibility. It offers a clean API and a modular architecture, making it easy to customize and extend. Quill is lightweight and provides a responsive user experience.
froala-editor
Froala Editor is a lightweight WYSIWYG HTML editor with a focus on performance and user experience. It offers a rich set of features, including inline editing, image management, and a variety of plugins. Froala Editor is known for its sleek design and ease of use.
tinymce-dist
Production ready minified version of TinyMCE excluding the source code, build tools and unit tests. If you need the full source code go to the main repository instead.
Tags
Each release has it's own tag using the semver standard. This means you can checkout a specific version using git clone.
git clone -b <version> git://github.com/tinymce/tinymce-dist.git
Git submodule
You can add TinyMCE as a submodule to your existing repository.
git submodule add git@github.com:tinymce/tinymce-dist.git tinymce
Package managers
You can also install TinyMCE using various package managers.