RichText Implementation

Jan Sælid janselid at broadpark.no
Sat Aug 5 08:04:23 EDT 2006


The scriptwriter needs to know if the user is editing dialogue, a character
name, an action etc.
the format of a script looks something like this:

---
			TRUMP
	You didn't call, Eliza. You know you
	won't	get anything if you...

He goes to the desk and snatches the... 
---

This format needs three different margins. One for the character name, one
for the dialogue and one for the "action" part. One approach I'm thinking of
is to use tabstops and have a rawkeyup handler in the field that checks what
type of element the writer is editing and puts the cursor at the right tab
if the writer e.g. pushes the downkey. The challenge with this method is
that I have to store every element in the script in a custom property of the
field with the number of tabs for each element. Maybe with a reference to
the linenumber. e.g. "The line1 of fld "Script". Am I on the right track? 

Hope this is understandable. Any ideas are appreciated. In the long run it
could be handy to make a library of functions that other revolution users
could use.

I Wrote:
>> I’m really in need of individual paragraphs.




More information about the use-livecode mailing list