Still typing away, but not ready yet.
It’s not so much bloat (I hope!), but just lots of work writing an editor up from scratch. And a bit of a slowdown in the worker (me) recently. Nothing in particular, just a bit more lazy then I used to be.
What I’m working on now
A fundamental feature of WriteRoom 4 is to make it a “rich text” markdown editor. This isn’t a new idea (see http://www.texts.io), but I think (for my vision anyway) it’s the best way. Markdown is the standard for writing, plain text documents have many benefits, but I hate dealing with the actual syntax as I write. I added a bunch of magic to FoldingText to try to work around that, but I think just switching to rich text editor style (but still saving/loading plain text Markdown) is better.
I just (2 days ago) got span (within single paragraph) level formatting working pretty well now. So for example to bold text, you just select and choose “bold” command it as you would in any rich text editor. Markdowns **'s are inserted automatically when you save, but you never type or edit around them.
Block level (paragraph) formatting is more difficult to figure out in some cases. In particular the trouble is how I should map it to my existing underlying outline model.
For basic block level types, such as headings it’s a pretty clear mapping. I will just set the “type” of the item that contains the heading to “heading”. Easy!
But it gets more complicated for block structures that contain other block structures. (such as blockquotes) There are standard ways to handle this sort of thing (internal items without text content of their own). But they complicate the API’s and editing model. I’m not sure what I’ll do here yet. I have a few ideas that I’m trying… at worst I might just not support problematic cases such as nested block quotes. Instead they would just be left in plain text form… still still possible, just not supported at model layer in editor.
Another thing that I’m unsure of is how much to use the underlying outline model. For example in Markdown level 1 headings don’t really contain level 2 headings. Visually we understand them that way, but structurally in the document a heading can’t contain other headings. For WriteRoom’s model it would make more sense to just have a “heading” type and to create a subheading you would indent one heading under another. Unfortunately I’m not sure how to map that back to markdown cleanly. For example:
In the above “outliner” style model it’s clear that Heading 1 contains text 1, Heading 2, and text 3. But when it gets saved out to Markdown the result would be:
# Heading 1
## Heading 2
Notice that text 3 appears to be part of Heading 2 in the Markdown output, where in the outline model it’s clearly a sibling to Heading 2, not part of it.
That got a little more detailed then I wanted, but that’s the details current WriteRoom progress.