Hi,
Is there any support in Rev, or an add-on, that will allow creating an editor with custom syntax highlighting? Or writing a program that will respond to changes in a large text file (rather than a simple text entry field)? I'm thinking about something along the lines of TodoPaper.
Thanks!
Custom text and rich text editing?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Custom text and rich text editing?
hyphz,
You'll have to parse the htmlText. For example, you could replace words with the same words surrounded by font tags:
You will need to figure out how to do this in a smart way. For example, it isn't always necessary to parse the complete text.
Another possibility might be to use a repear loop:
You could apply such a repeat loop to the line that is currently being edited or even to the last word(s) entered only.
Best,
Mark
You'll have to parse the htmlText. For example, you could replace words with the same words surrounded by font tags:
Code: Select all
replace " red " with " <font color=red>red</font> " in myData
Another possibility might be to use a repear loop:
Code: Select all
lock screen
repeat with x = 1 to number of words of fld y
put colorArray[word x of fld y] into myColor
if myColor is not empty then set the textColor of word x of fld y to myColor
end repeat
unlock screen
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode