Days
Hours
Minutes
Seconds
x

New Froala Editor v4.5.2 is here – Learn More

Skip to content
Froala Documentation

Migrate from Tiptap to Froala

Methods and Commands

Froala Editor is designed to obtain results with fewer lines of code. The examples below show how to use Froala Editor methods and how to achieve the same functionality in both Tiptap and Froala Editor. A complete list of methods is available on the Methods documentation.


Stops the editor instance and unbinds all events.

In Tiptap

editor.destroy();

In Froala

editor.destroy();

Returns the current editor content as HTML

In Tiptap

editor.getHTML();

In Froala

editor.html.get(true);

Check if there is content

In Tiptap

editor.isEmpty

In Froala

editor.core.isEmpty();

Clear the whole document

In Tiptap

editor.commands.clearContent();

In Froala

editor.html.set('');

Replace the whole document with new content

In Tiptap

editor.commands.setContent('hey, that’s cool!');

In Froala

editor.html.set('hey, that’s cool!');

Insert a node or an HTML string at the current position

In Tiptap

editor.commands.insertContent('hey, that’s cool!');

In Froala

editor.html.insert('foo bar', true);

Select the whole document

In Tiptap

editor.commands.selectAll();

In Froala

editor.commands.selectAll();  

Do you think we can improve this article? Let us know.