Issue #3218πŸ’¬ AnsweredOpened January 5, 2021by bgrand-ch2 reactions

How to add new HTML element with inline styles?

Quick answerby artf❀ 1

@bgrand-ch what do you mean by "probably"? πŸ˜…

Read full answer below ↓

Question

I would like to add a new HTML element, with inline styles, around the rte.selection(). With the following example, the HTML is OK, but probably not the JSON part:

Answers (4)

artfβ€’ January 6, 2021

@bgrand-ch what do you mean by "probably"? πŸ˜…

bgrand-chβ€’ January 6, 2021

@artf thanks for your quick response πŸ™‚ update dependencies to 0.16.30 resolves my problem πŸŽ‰

GJSBlockβ€’ May 17, 2026

Thanks for reporting this, @bgrand-ch. Great question about How to add new HTML element with inline styles?. The recommended approach with ProseMirror is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module Look for the on() event listener method Most o...

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins β†’
Premium option

Premium plugins ship with support, regular updates, and production-ready features β€” save days of integration work.

Browse premium plugins β†’

Related tutorials

In-depth guides on the same topic.

All tutorials β†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.