O'Reilly logo

HTML5 Data and Services Cookbook by Mite Mitreski, Gorgi Kosev

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Advanced rich text input

While the basic contentEditable-based rich text input field is sufficient in most cases, sometimes it is not enough. We might want to allow the users to insert more complex objects such as images and tables.

In this recipe, we're going to make an advanced rich text editor that supports inserting images and basic tables.

We're going to build this editor based on the simple rich text editor demonstrated in the Using contentEditable for basic rich text input recipe.

Getting ready

We're going to start with the code from the Using contentEditable for basic rich text input recipe and improve upon it.

How to do it...

Let's write the code.

  1. We're going to take the original index.html and example.js files but we will modify the HTML file. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required