Couple of HTML questions
colinholgate at gmail.com
Tue Sep 14 01:47:03 EDT 2021
I found a small styled text editor that I could add my buttons to, and can now edit text and send it to a PHP script to store online. Then a LiveCode stack can retrieve those files.
One problem I ran into was getting all of the characters to survive the ordeal. I could successfully get the text from the HTML editor to the online file, by using escape(the html of the text), but LiveCode doesn’t seem to have escape or unescape. It does have URLDecode, but if I used URLEncode the text wouldn’t fully upload to the PHP script.
In the end I had to use a replaceText for each of the unicode characters that were in the downloaded text. So far those have been bullets, checkmarks, and ellipses, and I do these lines:
put replaceText(it,"%u2026","…") into newtext
put replaceText(newtext,"%u221A","√") into newtext
set the htmltext of fld “rich text field" to replaceText(newtext,"%u2022","•")
More information about the use-livecode