Issue #1502💬 AnsweredOpened October 11, 2018by mudit-mittal0 reactions

Creating multiple child element after editing using RTE

Quick answerby mudit-mittal

Hi All, Please find step for reproducing this scenario 1) Initial state 2) Perform Bold Action then Italic Action then Underline Action 3) Again click on Bold Action then Italic Action then Underline Action Actual:- Getting three extra <span> element

Read full answer below ↓

Question

Hi All, I am getting below issues which are related to RTERTE creating multiple child's as action performed on text block. Ex:- suppose we performed same action (Bold) three times in sequence on same text block then its creating three child's on the same element.Font action in RTE is only supporting font size values between 1 to 7 so please provide the support for font size values between 1 to 100 in RTE. NP:- I am using latest version of library but issue is still here so kindly review. Previous bug for reference https://github.com/artf/grapesjs/issues/1495#issue-368617259 Kindly revert on p...

Answers (3)

mudit-mittalOctober 12, 2018

Hi All, Please find step for reproducing this scenario 1) Initial state 2) Perform Bold Action then Italic Action then Underline Action 3) Again click on Bold Action then Italic Action then Underline Action Actual:- Getting three extra <span> element

mudit-mittalOctober 12, 2018

Hi All, rte.add('fontSize', {icon: <select class="gjs-field"><option>1</option><option>4</option><option>7</option></select>,// Bind the 'result' on 'change' listenerevent: 'change',result: (rte, action) => rte.exec('fontSize', action.btn.firstChild.value),// Callback on any input change (mousedown...

artfOctober 19, 2018

This is just how execCommand works and the built-in RTE is based on it. If you need something more sophisticated you can try grapesjs-plugin-ckeditor or implement any other 3rd-party editor by following this guide: https://grapesjs.com/docs/guides/Replace-Rich-Text-Editor.html

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.