I've been trying to copy from rich text control.
Everything is fine when selecting and using CTRL+ C from the rich text control, then CTRL + V in other programs like MS Word.
Although if I try using a button using the copy function Ex: on select: Copy(dcStem.HtmlText), then paste it into other programs, all the HTML tags are pasted, and MS Word or others do not apply the formatting.
Is it any way to emulate the CTRL+ C from the rich text control, I'm guessing the Copy function messes with the original encoding, and now MS Word assumes is plain text.
Yes I'd be happy to! I'll send you a private message with a link as soon as I can.
Interesting. Thank you for a really detailed writeup. This is basically exactly what I'm after. I want a gallery of rich text templates so my users can select a frequently used template and copy and paste to their destined program.
Do you think you'd be able to export the app your end and send it to me so I can have a play and modify? I'd be eternally greatful if you were able to.
Thank you
Hmm, mine is definitely working - I just checked it again to be sure! But I did have a lot of issues in other ways getting this particular panel to function how I wanted it to as the data goes on a bit of a journey.
For context, this is in a Canvas app. I have a 'create entry' screen where the users enters text into a Rich Text Editor (amongst other controls). They press a button that patches that content (and the rest of the data) to a row in a Sharepoint list. That column is a "multiple lines of text" type with "Use enriched text" set to off.
There's then a 'main interface' screen with a gallery on the left that displays the contents of that list, and another rich text editor box on the right. Selecting an entry in the gallery sets a variable with the row ID. The rich text editor's Default is to Lookup the data in that "multiple lines of text" column from before using the row ID. Then finally, the Copy button has the Onselect we talked about - in my case Copy(PlainText(ET_ComplexViewer.HtmlText))
And that, when I paste it into Outlook, works 😄 That was a long story but I thought high detail is important, there may be a subtle element here that explains the difference or inspires you to find the source of the problem. I was having issues where...I think one of the earlier controls or steps in the process was stripping out the 'richness' of the rich text, so all the steps further down the line were just treating it as regular text.
Thanks for the tip. I can't seem to replicate this. So my button originally has the onselect property of -
Did you ever figure this out?
I had some luck just now by using Copy(PlainText(HtmlText1.HtmlText)) and then pasting the result into an Outlook email (also tested Excel). I am relieved but I have to admit it does feel a bit counterintuitive, like I would have thought "PlainText" by name would copy the text with the tags, in its plainest form. But oh well, I am not complaining!
Strangely, if you copy and paste with your mouse or keyboard shortcuts, it pastes without the HTML tags. It seems to be an issue with the Copy() function. I am also looking for a solution using the Copy() function without HTML tags if anyone finds one, thank you in advance.
The same thing happens if I use an HTML field.
Copy(htmlQuestion.HtmlText)
On paste at a Word document, the HTML format is pasted as plain text.
I see many people reading but no one proposed a solution. I'm assuming this is a tough one.
MS.Ragavendar
10
LC-26081402-0
6
EE-04041031-0
4