Chat and textarea formatting

harrison at all-auctions.com harrison at all-auctions.com
Wed Feb 15 11:32:28 EST 2023


Hi Richard,

It takes care of the line spacing problem fine which is good!

It doesn’t like apostrophes in words, and returns garbage for that.

It doesn’t keep any bold facing or text coloring information.

Thanks for this suggestion.

Rick



> On Feb 15, 2023, at 4:52 AM, Richard Gaskin via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> You may find it easier to set the contenteditable property of a container element like div or p, and then you can retrieve the inner HTML of that element with:
> 
>  var tFldMainHTML = document.getElementById("fldMain").innerHTML
> 
> Save the example below to a text file and run in your browser. There's extra stuff there just for appearance, but the meat of it is that one line.
> 
> Once the page is loaded, copy some styled text and paste it into the field. When the button's clicked you'll see the full HTML tags in an alert dialog.



More information about the use-livecode mailing list