by Underdog » Wed Jul 02, 2003 6:19 pm
Programming idea/warning:
In the first idea presented by "Guest", the ending tag would have to automatically match the indentation of the opening tag. The underlying code would have to figure out, "Is the opening tag on the line I'm on, or some line above this one?" In the first case, the closing tag would be inserted at the cursor. In the latter case, another question would have to be asked, "Is there other text on this line or not?" In the first case, a carriage return would be entered, and the tag's indentation would match the opening tag's. In the latter case, only the indentation would have to adjust because the user has probably pressed return already. Then the closing tag would be typed.
Guest "Bud"'s idea is probably easier to program. However, there shouldn't be an automatic line feed as he suggests, in case the user wanted an inline tag (like <b>|</b>, where | represents the cursor position). He's right, though, about not automatically inserting a closing tag when text immediately follows. This would require, then, that closing tags also be in the list of auto-complete tags for when the user moves to the end of the line to finish off the bold.