Issue #2676💬 AnsweredOpened March 21, 2020by 4URGB1 reactions

Changing color of a text part

快速解答by qtarant1

Hi, I made this task integrating CKEditor, so you can change font, font style, size or color.. The best is that you can select any part of the text an customize only that specific part.

Read full answer below ↓

Question

Hi, if i select only a part of a text to change the color it dosnt work. It change only the color for the complete text.

For example. If i want to change in "this is my text", only "my text", i select it, change the color, but the new color will go to the complete text.

May it is a smal thing, but its really useful at daily work :-)

Answers (2)

qtarantMarch 23, 2020

Hi, I made this task integrating CKEditor, so you can change font, font style, size or color.. The best is that you can select any part of the text an customize only that specific part.

artfApril 1, 2020

To do what you ask, you should add a new action to the built-in RTE and wrap the selected text in a wrapper (eg. a <span> element) and once it's wrapped you should be able to add the style you need Using a custom RTE (like the CKEditor) takes the content outside of the GrapesJS context so all the possible styles should be managed by the third-library itself

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.