- Creating Behavior Without Programming
- Using the Code Editor to Write REALbasic Code
- Getting Help with the REALbasic Language
- Mastering Dim and Assignment Statements
- Making Tests and Comparisons
- Writing Code that Branches
- Writing Code that Repeats
- Writing Your Own Methods
- Extending the HTML Editor
- Creating the Indent Menu Item
- Removing Existing Indentation
- Inserting Indentation Before Tags
- Handling the Indent Level
- Extending the Project
Extending the HTML Editor
In Chapter 2, you created a simple HTML editor. Although that application eases the process of entering HTML tags and special characters in a document, it doesn't do much else. In particular, it doesn't produce especially attractive or readable HTML documents.
In the remainder of this chapter, you will write a REALbasic method that you can use to generate cleanly formatted HTML. The method, called Indent, will put each tag on a separate line and indent the tags to show the level of nesting of tags. Sets of tags nested inside other sets of tags will be indented farther to show this nesting.
Creating this method requires only a few of the REALbasic programming techniques covered in this chapter.