Hi Richard, Thanks for the better example code.
When I copy colored text or bold faced text from TextEdit and pasted it into the box it doesn’t carry over. Of course if I copy the one sample line you provided that copies fine and renders fine. I also tried creating some text with bold and colored text using LibreOffice Write. It copied and pasted just fine. The rendering was correct but it put in a little more space between the lines for some reason. Perhaps I was using a strange font or something. The apostrophe problem went away too. I will have to do some more research with this. I’m not sure I can tell my users to all use LibreOffice Write when composing messages. Thanks for getting back to me! Rick > On Feb 15, 2023, at 1:46 PM, Richard Gaskin via use-livecode > <use-livecode@lists.runrev.com> wrote: > > What is the "junk" you're seeing for apostrophes? Could it be the Unicode > number or character entity? > > RE lost styles, like bold and color, are those rendered in the editable field > before obtaining the innerHTML? > > I find that a lot of this boils down to the Clipboard more than a browser > being able to know what it's rendering. > > If you can see it, it should be in the innerHTML. > > But sometimes copying styled text may not carry all information over in the > Clipboard. What you see when pasting will show you what came over in an > HTML-renderable way. > > Below is a new page with two new output fields: the first is a textArea > showing the raw HTML, the second shows the var contents rendered. > > I also included some sample text up top, and did some stylings inline with > others using CSS. On this page both carry over well, because this page > includes the CSS classes needed for referenced rendering. > > For thorough testing you'll want to also make some styled text in another > program, like a word processor, and paste that in to see what happens. > > When I do that here using styled text made in LibreOffice Write everything > shown in the paste field is accurately rendered in the final output field. > > -- > Richard Gaskin > Fourth World Systems _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode