I want to write in Markdown, Is it possible?

Hello,

I am so used to Markdown, that though I have had scrivener, I haven’t used it cause it lacked MD. Is there a plugin or a script I can run to start writing in Markdown?

If you mean “Can i write Markdown and immediately see what the output would look like within Scrivener (like you can with some apps like MarkMyWords)?” then the answer is “No”. The editor in Scrivener is Rich Text.

However, Scrivener has a Markdown parser (is that the right word) built in, which is accessed through Compile. If you read the many threads in this forum, you will see that you can simply write the Markdown directly, or leverage the advantage of the styles in the editor to inject the Markdown codes as part of the Compile process.

I’m not at my computer at the moment, so can’t give you more than that, other than to say, if you have Marked2 installed, I believe you can set Scrivener as its editor so that as you work typing the Markdown directly in Scrivener, Marked 2 will update with each automatic save to show you the rendered version.

:slight_smile:
Mark

1 Like

Just write, the whole point of markdown is it is plain text, no need for anything other than plain text! Scrivener can work with markdown in the editor without issue. As Mark mentions, Scrivener does not syntax highlight markdown, but we have a better trick: use styles, so for example you see bold without the asterisks but when you compile it becomes **bold**, this is a hybrid markdown, where are markdown is not used when writing, but is used when compiling. That means less clutter in the editor and way more flexibility when outputting for many different scenarios.

2 Likes

I would take a look at this thread, which starts out with a very similar question, and then as you read further, will get into some of Scrivener’s unique (and at times more advanced) advantages that it brings to the table as a Markdown editing platform. The first answer I linked to above is much aligned with what others have already said: you just type Markdown. Anything can be a Markdown editor, that’s rather one of its great ideals and purposes. We don’t need developers to make software for us, to “allow us” to do things.

That said, there’s a lot more to it than that, once you start digging into it, and it can scale to create quite elaborate works. Open the user manual from the Help menu, and scroll through that a bit, looking at its overall construction and formatting: that came out of a Markdown-based Scrivener project.

It is a bit of a misnomer that it lacks MD, as you put. But it’s an understandable one, since it is unlike most of the Markdown zenware type programs you’ll find. This thread goes a little into that as well, and how tools such as these, while they may format your text as you type it in a “pretty” fashion, are almost universally lacking in these two areas:

  • Large-scale text management: most strongly encourage long documents in single chunks, with Markdown headings in the text to help define structure. Some will build a read-only table of contents in a sidebar somewhere based on that. You can’t move sections around, or promote a subsection to a chapter, but if you do that by hand by manipulating hashes it will show your efforts. In Scrivener, you just drag the outline node up to a higher level. The hashes, and all the hashes for subheadings below that level, will automatically follow the level you put them on when you compile. No more manually deleting two hashes from every heading in a section to promote it, or running regular expressions to be slightly more efficient at it.

    This aspect of Scrivener is fairly broad, and as I say it’s a bit unique in how far it takes the outlining concept. It’s not particularly aimed at Markdown writing, but it very much compliments it, and has deep support for it in the compile phase. It’s a whole different way of writing long texts, than many tools take, and can take some acclimation to get used to.

  • As I go into in that thread, the other area many tools are lacking in are the construction of works that require more complex formatting than what Markdown itself provides for. With the two most popular tools for conversion, MultiMarkdown and Pandoc (both of with Scrivener integrates with), there are conventions for extending the syntax—but they are messy to write with and edit around. This post, in that same thread, demonstrates just how messy that can get. The secret sauce here is in fact the very properties that confuse many people into thinking Scrivener doesn’t support Markdown. That it is a “rich text editor” instead of the typical syntax-highlighting plain text editor means formatting can drive and generate syntax that doesn’t exist yet. I can create a style in Scrivener that outputs paragraphs of “syntax garbage” around it, meant to generate detailed formatting in target outputs like HTML/ePub, DOCX and LaTeX. I can, in essence, build features that don’t exist anywhere but for what my text needs. It’s not something everyone needs, but I think many might like even a little of that, now and then. You’ll sometimes see people asking questions like: how can I can format text messages sent between characters in my novel. It’s the kind of thing being able to extend Markdown syntax can do rather easily.

    An adjunct to this is that there are many kinds of formatting that don’t generate syntax, and that’s a good thing too. How many dedicated Markdown editors do you know of that let you have a rainbow spectrum of different highlighters that you can use to mark your text in an editorial fashion, and search for those highlight colours, or even name them for their purpose? How many support multiple streams of notation, for works that need endnotes as well as footnote? How many support struck-through text that is actually functional—that can be stripped out when compiled?

    Scrivener is a Markdown editor that lets you do these things, and more.

At some point you’ll want to crack open the user manual and turn to Chapter 21, which the existence of should thoroughly squash any notions that Scrivener has no MD support.

To be fair, some really can’t abide by the fact that the text editor has no Markdown typing aids, and so them Scrivener is “not a Markdown editor”. That is understandable, I feel that way too sometimes, but it isn’t a limitation that really impacts me, because for those kinds of tasks, for projects that don’t need a lot of extended syntax generation, where I can get by with pure Markdown everywhere: we’ve got that covered as well. This post focuses primarily on using Sublime Text as a “front end editor” for Scrivener, but there are plenty of excellent tools that can operate seamlessly in that role. A popular one these days is Obsidian, which can have a Vault associated with Scrivener’s external sync folder. In some projects, I’ll leave Scrivener’s binder open behind the Markdown editor I’m using, off to the side, and use its outliner to manage the overall construction and development of the text’s structure, while doing all of the first-draft writing in the other program. Such usages will benefit greatly from attaching a keyboard shortcut to Scrivener’s File ▸ Sync ▸ with External Folder Now menu command.

The other approach is one Mark pointed out, for Mac users there is an excellent tool called Marked that can open Scrivener projects passively and render a Markdown preview of your entire draft as you type, in real time. If you’re mainly looking for that, rather than typing aids, that might be a simpler approach than the external folder setup. It surprises me that idea hasn’t spread to other platforms, because it’s a really good one. Why bind yourself to a mediocre text editor (and let’s be honest, a lot of them are) just because it has a live preview split? Why not have a live preview “split” that works on any file, and you pick which editor you want to use? Seems amazing, but for some reason neither Windows nor Linux has much of anything of its calibre. The closest I’ve found on Linux is Okular, which has a Markdown rendering plugin that will refresh whenever the disk updates, but it’s extremely basic.

So there are options. Like I say, I use them when it suits what I’m working on. But I don’t always use them, and very often Scrivener is the beginning and the end of where a Markdown-based project goes. Myself, I don’t really mind typing in the syntax myself, it is a deeply ingrained habit. I also don’t mind looking at it, in fact I prefer it. I don’t use Markdown editors that hide it, and don’t really understand their appeal. So that’s where I’m coming from anyway, when I say that to me, Scrivener is a Markdown editor—but more than that, it goes beyond being an editor, because for everyone, rich text users as well, Scrivener isn’t really about what goes on inside the rectangle you type into. What really makes it shine is everything around that rectangle. And for that, you’ll have a hard time find anything that comes close to what it can do. That’s the rest of the user manual.

5 Likes