即使对那些不知道 Markdown 的人来说，Marktext 也是一个绝佳的编辑器
Markdown Marktext 编辑器
![](/data/attachment/album/202208/31/170837f0kx77ewii4hkih0.jpg)


又一个 Markdown 编辑器？我们见的 Markdown 编辑器还少吗？


我明白你的感受，如果你是个 Markdown 爱好者，你可能已经用过很多 Markdown 编辑器了，比如 [Joplin](https://itsfoss.com/joplin/) 和 [Zettlr](https://itsfoss.com/zettlr-markdown-editor/)。但如果你不是的话，你可能根本就不在乎。


Markdown 是一个非常好的标记语言，特别是对那些在网络上写作的人来说。我不想在这里讲太多细节，但如果你有兴趣的话，我们有一篇 [非常棒的 Markdown 初学者教程](https://itsfoss.com/markdown-guide/)。


这次我想推荐给你（另一个）Markdown 编辑器，它叫 [Marktext](https://github.com/marktext/marktext/)，并且它是用 Electron 制作的（我们都明白这什么意思，先别急着埋怨我）。


我发现这将是一个很完美的编辑器。它很漂亮，而它运行起来也一样棒。下面是我这几天来的使用体验。


### Marktext: 人人可用的 Markdown 编辑器


尽管我很讨厌 [Electron 框架](https://www.electronjs.org/)，但不得不承认基于 Electron 的应用都有一个干净、现代的界面。


![Marktext interface](/data/attachment/album/202208/31/170842ix409nz0u99rg0yt.png)


我更喜欢深色模式主题，除此之外官方还提供了五种其它主题。


![Marktext dark theme](/data/attachment/album/202208/31/170842rvjhv2av54dhx8c0.png)


打开软件你就可以立刻进行写作，如果你不记得某个语法了，那也没有问题，输入 `@` 就可以得到语法提示，如：


* 标题
* 分隔线
* 表格
* Latex 数学公式
* HTML 块
* 代码块
* 引用
* 列表
* 检查清单
* 用 Vega-lite.js、Flowchart.js、js-sequence-diagrams 和 PlantUML 制作的图表


![Use various document elements in the editor by pressing @](/data/attachment/album/202208/31/170842f1paaaponzjep51z.png)


选中文本你会得到一个格式选项框，来改变文本为粗体、斜体、下划线、删除线等。你也可以用黄色背景高亮文本、转换为内联代码、内联公式或插入超链接。


![Text formatting options](/data/attachment/album/202208/31/170843zk63kgzl2gfa6z32.png)


Marktext 也支持图片。我们都知道图片不是 Markdown 文件的一部分，它们是外部元素，但是你可以选择将图片保存到 .md 文件所在的目录下。


![Images are supported too](/data/attachment/album/202208/31/170843c0sjh88c4o77fo4x.png)


通过插入菜单来添加图片非常容易。你可以选择文本并且从弹出的格式选项中选择图片来添加，或使用 `Ctrl+Shift+I` 快捷键。但是不能为图片添加替换文本或图片说明，这点确实需要改进。


我喜欢 Marktext 的表格功能。你可以直接插入预先定义好大小的图表。如有需要，还可以很容易的改变大小。你可以只用鼠标移动列和行，而不用担心底层的代码。


![Tables are very well supported in Marktext](/data/attachment/album/202208/31/170843l54j8mjaop4j8o58.png)


你可以启用侧边栏视图。侧边栏有三个功能：你可以打开包含多个 Markdown 文件的文件夹，在打开的文件夹中的所有文件上执行全局搜索，并显示当前打开的文件的大纲目录。大纲目录是根据子标题自动生成的。


![Sidebar view has three options: Show folder content, global search and table of content](/data/attachment/album/202208/31/170843dvfgodvvik4llly5.png)


底部的齿轮按钮是设置功能。你可以改变主题、改变图片设置、视图、开启自动保存等等。


![Configuration and settings](/data/attachment/album/202208/31/170844qmumf882uo0mvbog.png)


### 如何安装 Marktext


Marktext 是一个跨平台的开源应用程序。所以不止在 Linux 上，你还可以在 Windows 和 macOS 安装。


在 Linux 上，你可以选择 AppImage 软件包或 Flatpak 软件包。从 [这里](https://github.com/marktext/marktext/releases) 可以得到 Marktext 的 Appimage 软件包。


我选择了 Flatpak 版本，因为这样可以获得更好的系统集成。它运行良好，Marktext 自动成为我的 Ubuntu 22.04 系统上 .md 文件的默认编辑器。


请确保你启用了 Flatpak 支持，之后用以下方法添加上 Flathub 仓库：



```
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

```

在这之后，用以下命令安装 Marktext 到你的系统上：



```
flatpak install flathub com.github.marktext.marktext

```

如果用了一段时间后你不喜欢 Marktext，可以用以下命令卸载：



```
fkatpak uninstall com.github.marktext.marktext

```

### 总结


Marktext 有很多小功能，例如字数统计、Latex 数学公式、拼写检查器、复制粘贴为 Markdown/HTML 格式，我留给你们自己去尝试。


实话实说，尽管多年来一直使用 Markdown 来写文章，但我也总会忘掉一些语法。我能记得常见的标题、列表、代码块等，但如果我必须创建一个表格，我不得不在网上搜索。


我已经 [尝试了许多 Markdown 编辑器](https://itsfoss.com/best-markdown-editors-linux/)，这其中确实有很多不错的。但是，我还是喜欢用 Marktext，它会在我的系统上存在很长时间。


如果你已经用过了话，请在评论区分享你的经验。




---


via: <https://itsfoss.com/marktext-editor/>


作者：[Abhishek Prakash](https://itsfoss.com/) 选题：[lkxed](https://github.com/lkxed) 译者：[Chth0lly](https://github.com/Chth0lly) 校对：[wxy](https://github.com/wxy)


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


OK
Another Markdown editor? Have we not seen all kinds of Markdown editors already?

I understand that feeling. If you are a Markdown lover, from [Joplin](https://itsfoss.com/joplin/) to [Zettlr](https://itsfoss.com/zettlr-markdown-editor/), you have tried most of them. And if you are not a Markdown fan, you probably don’t care about these editors.

Markdown is an excellent markup language especially for people who write for the web. I am not going to go into the details here. We have an [excellent Markdown starters guide](https://itsfoss.com/markdown-guide/) if you are interested in learning more about it.

My focus here is on introducing you to (another) Markdown editor, It’s called [Marktext](https://github.com/marktext/marktext/) and it is an Electron app (don’t hate me just yet).

I found it to be an excellent editor. It works as well as it looks. Let me share my experience and its features.

## Marktext: A Markdown editor for everyone

Hate [Electron framework](https://www.electronjs.org/) as much as possible but you cannot deny that Electron-based applications have a clean, modern interface.

I prefer dark mode and hence I switched the theme. There are six themes in total for you to choose from.

You can start writing the text immediately. If you don’t remember the text, don’t worry. Just use the insert option with @ and it will give you a number of options such as:

- Headings
- Divider line
- Table
- Mathematical equations
- HTML block
- Code block
- Quote block
- Lists
- Checklist
- Diagrams using vega-lite.js, flowchart.js, js-sequence and PlantUML

Select part of the text and it gives you additional formatting options to change the text to bold, italic, underline, or strikeout. You can also highlight the text with yellow background text, convert them into inline code or inline math and create hyperlinks.

Marktext also supports images. However, you know that images are not part of the markdown (.md) file. They are external elements, but you have the option to create a local assets folder in the same location where your Markdown file is saved.

Adding images could have been made easier if they were included in the insert menu. At the moment, you can add images by selecting text and choosing the image option from the format options or using Ctrl+Shift+I keys. There is no scope for adding alt text or captions to the images. This should be improved.

I liked the tables feature in Marktext. You can insert a table with a predefined size. If you change your mind, you can resize it as easily. You can move the rows and columns, all with mouse drag and drop without touching the underlying code.

You can enable the sidebar view. The sidebar gives you three options. You can open folders containing multiple markdown files, perform a global search in all the files in the opened folder and show the table of contents for the currently opened file. The table of content is automatically generated based on the subheadings.

The gear icon at the bottom gives you additional settings to configure the editor. You can choose the themes, change image settings, views, enable auto-save and modify many more settings.

## Installing Marktext

Marktext is a cross-platform, open source application. Along with Linux, it is available for Windows and macOS.

For Linux, you get the options of AppImage and Flatpak. You can get the AppImage from[ the release page](https://github.com/marktext/marktext/releases).

I chose the Flatpak version for better system integration. And it did work well because Marktext automatically became the default editor for .md files on my Ubuntu 22.04 system.

Please ensure that you have Flatpak support enabled on your system and then add Flathub repo:

`flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo`


After that, use the command below to install it on your system:

`flatpak install flathub com.github.marktext.marktext`


If you don’t like it, you can remove it using this command:

`flatpak uninstall com.github.marktext.marktext`


## Verdict

There are plenty of small features like word count, math latex, spell checker or copy-pasting as markdown or HTML and I leave them up to you to discover.

I’ll be honest. Despite using Markdown for writing articles for years, I don’t remember all the syntaxes. I remember the common ones for headings, lists, code block etc but if I have to create a table, I’ll have to search the web.

I have [experimented with a number of markdown editors](https://itsfoss.com/best-markdown-editors-linux/) and there are plenty of good ones there. However, I took an instant liking to Marktext and it will be on my system for a long time.

If you try it, do share your experience in the comment section.