Issue #3131πŸ’¬ AnsweredOpened Nov 11, 2020by Joshmamroud0 reactions

Paste as plain text into Text component adds <font /> wrapper to pasted text

Quick answerby Joshmamroud

@artf do you know if this is this happening in the component or the RTE or somewhere else? Could you please point me in the right direction? Any help on this would be greatly appreciated. Thanks!

Read full answer below ↓

Question

Version: 0.16.27 Are you able to reproduce the bug from the demo? [] Yes [X] No What is the expected behavior? Paste as plain text (text node) without Grapes JS wrapping pasted text in <font /> element. What is the current behavior? When I paste text as plain text into an empty Text element, the editor wraps it in a <font /> element. Before text is pasted After text is pasted (as plain text) The contents on my clipboard are plain text then I paste as plain text and it still gets wrapped in a <font /> element. This does not happen when there's already content in the Text component. The text "I...

Answers (4)

Joshmamroudβ€’ Nov 16, 2020

@artf do you know if this is this happening in the component or the RTE or somewhere else? Could you please point me in the right direction? Any help on this would be greatly appreciated. Thanks!

artfβ€’ Nov 19, 2020

I can't reproduce it, but I see you're using a custom dm-text component, so that might be a reason?!

Joshmamroudβ€’ Nov 19, 2020

@artf I don't believe so. Here is the configuration of the dm-text component type Do you see anything here that might be causing it?

GJSBlockβ€’ May 17, 2026

Thanks for reporting this, @Joshmamroud. The issue with Paste as plain text into Text component adds <font /> wrapper to pasted text appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modifications overlap, creating an i...

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.