Rich Text Web Component Copy and Paste

Started by Gary C., April 08, 2022, 03:09:28 PM

Previous topic - Next topic

Gary C.

Hi
It appears that one cannot paste clipboard contents into the rich text editor web component.

Does anyone know if this is intended behaviour or am I missing a property I can set?

We are using 3.20.

Thanks
Gary

Reuben B.

What are you pasting?  is it something that could be typed into the Rich Text Editor?

is there a difference between right-click Paste and right-click Paste and Match Style.

Reuben
Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero

Gary C.

Hi Reuben
Thanks for replying.
The actual scenario was a user trying to copy text previously entered into a TEXTEDIT control.
They could paste the content into Notepad and Word, just not the rich text component.

I had only being trying the ctrl-v shortcut, but paste and match style from the context menu worked.
Gary

Reuben B.

Interesting.  Using a clipboard viewer it appears that the clipboard buffer is populated with html when copying from a TEXTEDIT.  Even if explicitly state that textFormat="plain". Hence not being able to paste into the fglrichtext unless you select "Paste and Match style".

I have created a task to double-check that what we are doing when copying from TEXTEDIT is correct.  It might not be taking textFormat="plain" and textFormat="html" into account.

Reuben
Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero

Reuben B.

Gary,

For me, there is an improvement between GDC 3.20.20 and GDC 3.20.21.  There isn't an identifiable issue but there is a Qt upgrade that might be responsible.  So if you have not already, double check with latest 3.20 GDC.  The clipboard maybe populated with appropriate content that the fglrichtext web component can interpret.

Reuben
Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero