使用 Nextcloud 中的 Markdown 编辑器应用
Markdown Nextcloud

> 
> Nextcloud 拥有流行的 Markdown 文件的最流畅的编辑器之一，它有很多方便和直观的功能。
> 
> 
> 


![](/data/attachment/album/202101/09/164849mofte5zy5ryuewax.jpg)


纯文本的好处是，没有额外的针对计算机的信息会杂乱无章地出现在原本供人类阅读的文字中。计算机的好处是它们是可编程的，因此只要我们人类同意在写作时遵循非常特定的惯例，我们就可以对计算机进行编程，将人类可读的文本解释为秘密指令。例如，我们在一个词的周围打上两个星号，不仅可以给人类一个视觉上的提示，说明这个词很重要，我们还可给计算机编程让它用**粗体**显示这个词。


这正是 [Markdown](https://opensource.com/article/19/9/introduction-markdown) 背后的理论和实践，这种流行的纯文本格式向作者们承诺，只要\_他们\_使用特定的纯文本约定，那么他们的文本就会以特定的风格呈现。


传统中，这意味着作者用纯文本写作，直到文本被传给转换器应用（最初是 `markdown.pl`），才会看到漂亮的样式，但 Nextcloud 的 Markdown 编辑器应用改变了这一点。


通过 Nextcloud 的 Markdown 编辑器，你可以一边输入纯文本，一边看到它渲染后的样式。这对于那些要努力记住 Markdown 有时令人困惑的符号的作者们无异于是救星（方括号是在小括号中的超链接之前还是之后？）。而且更好的是，它运行在 Nextcloud 中，所以你可以在任何地方使用它。


### 安装


要使用 Nextcloud 的 Markdown 编辑器，你必须安装 Nextcloud。好消息是，Nextcloud 非常\_容易\_安装。我已经在树莓派、共享服务器、甚至作为一个本地应用安装了它（这是愚蠢的，不要这样做）。如果你不相信自己的能力，你甚至可以依靠 [Turnkey Linux](https://www.turnkeylinux.org/nextcloud) 来帮你完成这些难关，否则就直接从 [Nextcloud.com](http://nextcloud.com) 购买托管服务。在你安装 Nextcloud 后，添加应用就很简单了。点击 Nextcloud 界面右上角的用户图标，选择 **Apps**。找到 **Office and Text** 类别，点击安装并启用 **Markdown Editor**。


![Nextcloud app store showing Markdown Editor installer](/data/attachment/album/202101/09/164903g0mvn9c4stmblz9q.jpg "Nextcloud app store showing Markdown Editor installer")


### 启动


激活后，Markdown 编辑器会与 Nextcloud 文件中任何以 .md 结尾的文件相关联，当你打开一个 Markdown 文件时，你就会启动 Markdown 编辑器。


### 使用 Markdown 编辑器


Markdown 编辑器包含了一个大的文本区域供你输入，以及一个沿着顶部的工具栏。


![Example markdown file](/data/attachment/album/202101/09/164903cmmaw8q8983q8udq.jpg "Example markdown file ")


工具栏包含了文字处理器的基本功能：用粗体、斜体和删除线设计文本样式、创建标题和段落、列表等等。


如果你了解 Markdown，这些功能中的许多可以在你输入时自动调用。如果你不熟悉 Markdown，那么工具栏或常用的键盘快捷键（`Ctrl+B` 表示粗体，`Ctrl+I` 表示斜体等等）可以帮助你设计文本的样式。


Markdown 编辑器的工作方式的最好的一点是，它真正做到了使人人满意：如果你想以 Markdown 格式输入，那么它就会接受它并立即将其转化为视觉样式；如果你不想操心 Markdown 语法，那么当你使用键盘快捷键或工具栏按钮时，它就会为你生成样式。无论哪种方式，你永远不会看到 Markdown 语法格式，但你也永远不会失去它。这是一个完美的折中方案。


它也是一个非常聪明的编辑器。当你选择一个单词时，它会为你创建一个超链接，它能快速流畅地自动转换 Markdown，而且它知道一些不同“风格”的 Markdown 语法（主要是 Commonmark，但也有传统的 Markdown、Github Markdown，等等）。


![black text on white background, word highlighted in blue to create an automatic link](/data/attachment/album/202101/09/164904z8g1o8hm1m181dhs.jpg "black text on white background, word highlighted in blue to create an automatic link")


### 尝试 Nextcloud


我用过几个 Markdown 预览应用，Nextcloud 的 Markdown 编辑器是最流畅的一个。它尊重用户，并为显示 Markdown 做了最基本的工作，所以它的转换速度很快，也很准确。因为它是 Nextcloud 中的一个应用，你还可以获得这样的好处：你的作品可以即时保存在自己的私有的开源云上，并进行版本控制。没有比这更好的文本编辑器了。




---


via: <https://opensource.com/article/20/12/nextcloud-markdown>


作者：[Seth Kenlon](https://opensource.com/users/seth) 选题：[lujun9972](https://github.com/lujun9972) 译者：[geekpi](https://github.com/geekpi) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
The advantage of plain text is that there’s no extra computer-specific information cluttering up your otherwise human-readable writing. The good thing about computers is that they’re programmable, and so as long as we humans agree to follow very specific conventions when writing, we can program computers to interpret human-readable text as secret instructions. For instance, by surrounding a word with two asterisks, we not only give a visual cue to humans that a word is significant, but we can also program computers to display the word in **bold**.

This is exactly the theory and practice behind [Markdown](https://opensource.com/article/19/9/introduction-markdown), the popular plain text format that promises writers that as long as *they* use specific plain text conventions, then their text will be rendered with a specific style.

Traditionally, that has meant that an author writes in plain text and doesn’t see the pretty styling until the text is fed to a converter application (originally `markdown.pl`

), but the Markdown Editor app in Nextcloud changes that.


With Nextcloud’s Markdown Editor, you can type in plain text while seeing the style it renders. This is a gamechanger for authors who struggle to remember Markdown’s sometimes confusing notation (do the brackets become before or after the parentheses in a hyperlink?) or who just don’t like the look of plain text. And better yet, it runs in the (Next)cloud, so it’s available to you anywhere.

## Install

To use Nextcloud’s Markdown Editor, you must have an install of Nextcloud. The good news is, Nextcloud is surprisingly *easy* to install. I’ve installed it on a Raspberry Pi, on a shared server, and even as a local app (which is silly, don’t do it). If you don’t trust your own abilities, you can even rely on [Turnkey Linux](https://www.turnkeylinux.org/nextcloud) to do the hard part for you, or else just purchase managed hosting directly from [Nextcloud.com](http://nextcloud.com). Once you have Nextcloud installed, adding apps is simple. Click on your user icon in the top right corner of the Nextcloud interface and select **Apps**. Navigate to the **Office and Text** category and click to install and enable the **Markdown Editor**.

![Nextcloud app store showing Markdown Editor installer Nextcloud app store showing Markdown Editor installer](https://opensource.com/sites/default/files/uploads/nextcloud-app-install-31_days-markdown-opensource.jpg)

## Launching

After activation, the Markdown Editor gets associated with any file ending in .md in your Nextcloud files, so when you open a Markdown file, you launch Markdown Editor.

## Using Markdown Editor

The Markdown Editor contains a large text field for you to type into and a single toolbar along the top.

![Example markdown file Example markdown file](https://opensource.com/sites/default/files/uploads/nextcloud-markdown-31-days-opensource.jpg)

The toolbar contains the basic functions of a word processor—styling your text with bold, italics, and strike-through, creating headings and paragraphs, lists, and so on.

Many of these functions get invoked automatically as you type if you know Markdown. If you’re not familiar with Markdown, then the toolbar or the usual keyboard shortcuts (**Ctrl+B** for bold, **Ctrl+I** for italics, and so on) help you style your text.

The great thing about the way Markdown Editor works is that it truly is all things for all users: if you want to type in Markdown, then it accepts that and instantly converts it into visual styling, and if you don’t want to think about Markdown, then it generates the style for you when you use keyboard shortcuts or toolbar buttons. Either way, you never have to see the Markdown syntax, but you also never lose it. It’s the perfect compromise.

It’s an awfully smart editor, too. It offers to create a hyperlink for you when you select a word, it auto-converts Markdown quickly and smoothly, and it knows a few different "flavors" of Markdown syntax (Commonmark primarily, but also traditional Markdown, Github Markdown, and so on).

![black text on white background, word highlighted in blue to create an automatic link black text on white background, word highlighted in blue to create an automatic link](https://opensource.com/sites/default/files/uploads/nextcloud-link-31_days_markdown-opensource.jpg)

## Try Nextcloud

I’ve used a few Markdown preview applications, and Nextcloud’s Markdown Editor is one of the smoothest. It respects its user and does the bare minimum to display Markdown, so its conversion is fast and accurate. Because it’s an app in Nextcloud, you also get the benefit of having your work saved instantly, with version control, on your own private, open source cloud. Text editing doesn’t get much better than that.

## Comments are closed.