Edit Oops… just realized this won’t work for anyone until I post a new version of Birch that includes some new API used by this package. Will post that tomorrow.
I’ve just posted a package for authoring Markdown in Birch:
It’s a work in progress, but I hope it will serve as an example for how such a thing might be done in Birch.
The approach is very simple. For each Markdown type that I want to support I’ve added a command. For example I have commands for “Make Heading”, “Make Code Block”, “Make Ordered List”, etc. Each of these commands simply sets the
data-type of each selected item. This package also adds some styling rules so that items where
data-type="heading" are styled with a brighter color for example.
I also have a “Copy as Markdown” command that converts the content of my outline to Markdown text, which I can then feed into a Markdown processor to generate the final users guide.
There’s still lots to be done to make this user friendly, but I think the basic approach is sound. If you do decide to use this package make sure to checkout the included keymap…
You aren’t likely to want to do Command-Shift-P and then search for each “Make” command every time… so instead enter outline mode “Escape” key. And then just type
t h to make a heading, or
t c to make a codeblock.
Longer term to make this user friendly I’ll probably add a formatting toolbar, but that’s just UI. In the end it will just be calling the same code as the current commands.