markdown 邮件
Markdown provides a simple way to mark up plain text so that it can be converted to HTML.
Markdown提供了一种简单的方法来标记纯文本,以便可以将其转换为HTML。
I use Markdown daily to write documents, website content and so on. I also compose a lot of emails, so I was delighted to stumble on an easy way to create pretty HTML emails with Markdown too.
我每天都使用Markdown编写文档,网站内容等。 我也撰写了很多电子邮件,因此我很高兴偶然发现一种使用Markdown创建漂亮HTML电子邮件的简单方法。
Markdown Here (MDH) is a simple browser extension that can be installed in browsers such as Chrome, Firefox, Safari and Opera. It adds an icon to your browser's address bar:
Markdown Here (MDH)是一个简单的浏览器扩展程序,可以安装在Chrome,Firefox,Safari和Opera等浏览器中。 它将图标添加到浏览器的地址栏中:
Simply add Markdown syntax to your email, and when you're ready to send, click the MDH icon. (You can also activate MDH via a keyboard shortcut of your choice—CTRL + ALT + M by default—or a via a dropdown context menu.) Clicking that icon means that all of your Markdown is converted to HTML—so you end up sending an HTML email. (No Markdown actually gets sent with the email, so you don’t have to worry about email clients not understanding it.)
只需在您的电子邮件中添加Markdown语法,然后在准备发送时,单击MDH图标。 (您也可以通过选择的键盘快捷键(默认情况下为CTRL + ALT + M或通过下拉菜单来激活MDH)。)单击该图标表示您的所有Markdown都转换为HTML,因此最终发送HTML电子邮件。 (实际上Markdown不会随电子邮件一起发送,因此您不必担心电子邮件客户端不了解它。)
For example, you can send emails that look like this:
例如,您可以发送如下电子邮件:
If sending email in the browser isn't your thing, you can also use MDH with email clients such as Thunderbird, Postbox and Icedove.
如果您不必在浏览器中发送电子邮件,则还可以将MDH与电子邮件客户端(例如Thunderbird,Postbox和Icedove)一起使用。
And Markdown Here isn't limited to email. You can use it in other web editing interfaces such as Google Groups, Evernote and WordPress.
Markdown不仅限于电子邮件。 您可以在其他网络编辑界面(例如Google网上论坛,Evernote和WordPress)中使用它。
I tend to send email directly through Gmail in my browser. It's really nice to be able to enhance emails with some HTML formatting, which is easy with Markdown.
我倾向于直接在浏览器中通过Gmail发送电子邮件。 能够使用某些HTML格式增强电子邮件非常好,而Markdown则很容易。
I often need to send longish emails, and it's great to be able to add headings, quotes, inline code, code blocks and lists to make the email readable and break up the content.
我经常需要发送冗长的电子邮件,并且能够添加标题,引号,内联代码,代码块和列表以使电子邮件可读并分解内容非常好。
Here are some examples of what you can do.
这是您可以做什么的一些示例。
Being involved in web design and development, I often send code samples in emails. Writing inline code is as easy at this:
参与Web设计和开发时,我经常通过电子邮件发送代码示例。 编写内联代码很容易:
You could try `.element {display: block;}` instead.After the MDH conversion, the above text look like this:
MDH转换后,上面的文本如下所示:
And a block of code is easy too. Note that you can specify the language to get nice syntax highlighting:
代码块也很容易。 请注意,您可以指定语言以突出显示语法:
```javascript (function() { var method; var noop = function () {}; var methods = [ 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log' ]; var length = methods.length; var console = (window.console = window.console || {}); }()); // From the HTML5 Boilerplate ```And this is the result:
结果如下:
It's handy to be able to quote text in an email. Simply copying the text and placing a > before it is super easy:
能够在电子邮件中引用文本很方便。 只需复制文本,然后在>之前放置一个> :
> Should I click this email link saying I'll win $1MM? Nah, maybe not.Resulting in this:
结果是:
Rather than sending long, potentially unsightly URLs, you can easily convert them to nice, text-based links:
您可以轻松地将它们转换为漂亮的,基于文本的链接,而不必发送可能会很长的冗长的URL:
There are some great articles on [SitePoint](https://www.sitepoint.com/).Which renders like so:
如下所示:
Text is often easier to read in lists. Creating ordered and unordered lists is as simple as this:
文本通常在列表中更易于阅读。 创建有序列表和无序列表非常简单:
- first item in an unordered list - second item in an unordered list 1. first item in an ordered list 1. second item in an ordered listThis is the result:
结果如下:
You can markup headings like so:
您可以像这样标记标题:
# Heading One Some text ## Heading TwoRendering thusly:
因此渲染:
You can easily add italics and bold like so:
您可以像这样轻松添加斜体和粗体:
*These* are both _italic_, and **these** are both __bold__. And this is *__italic and bold__*.Which appears like this:
看起来像这样:
If I'm changing topic, it can be nice to throw in a horizontal rule:
如果我要更改主题,最好插入水平规则:
End of one topic. --- Beginning of the next …Which outputs like this:
像这样的输出:
Admittedly, I rarely need to place a table in my emails, but it's nice that you can:
诚然,我很少需要在电子邮件中放置表格,但是很高兴您可以:
Selector | Property | Value --- | --- | --- `body` | **color** | *#30353b* `.aside` | **float** | *right* `img` | **display** | *inline-block*The above text renders like this:
上面的文本呈现如下:
You can add images to your email, as long you can link to them somewhere online:
您可以将图像添加到电子邮件中,只要您可以在线链接到它们即可:
Here's a cool picture of grass: ![grass](https://unsplash.it/600/200?image=487)MDH also allows you to add HTML elements that aren't covered by Markdown. For example, you could add superscript:
MDH还允许您添加Markdown未涵盖HTML元素。 例如,您可以添加上标:
This is the 1<sup>st</sup> presentation … This text should be <s>crossed out</s>.MDH uses GitHub-like styles by default. But you can easily customize the styling if you want. For example, in Chrome for Mac, go to Window > Extensions, where you'll see the MDH extension:
MDH默认使用类似GitHub的样式。 但是,您可以根据需要轻松自定义样式。 例如,在Mac版Chrome浏览器中,转到窗口 > 扩展程序 ,您将在其中看到MDH扩展程序:
Click on the Options link. This opens a very useful Options page, where you can alter various MDH settings, including styles. You can either choose from a list of themes (including some spiffy ones popular in code editors like Sublime Text), or write your own CSS entirely:
单击选项链接。 这将打开一个非常有用的“选项”页面,您可以在其中更改各种MDH设置,包括样式。 您可以从主题列表中进行选择(包括一些在代码编辑器中流行的精美主题,例如Sublime Text),也可以完全编写自己CSS:
While you're on this page, make sure to check out the other available options, such as setting a preferred keyboard combination for activating MDH.
在此页面上时,请确保签出其他可用选项,例如设置用于激活MDH的首选键盘组合。
MDH is easy to install. The official site provides a number of links through which to add it to your browser or email client. You can also get the project's source code, hosted at GitHub, from that page.
MDH易于安装。 官方站点提供了许多链接,可通过这些链接将其添加到浏览器或电子邮件客户端。 您还可以从该页面获取托管在GitHub上的项目的源代码。
Finally, here are some links to resources for using and learning about MDH:
最后,这是一些使用和学习MDH的资源链接:
the MDH home page
MDH 主页
the MDH features at a glance
MDH 功能一目了然
the MDH installation page
MDH 安装页面
a handy MDH cheat sheet
方便的MDH 备忘单
a list of MDH tips and tricks
MDH 提示和技巧列表
an MDH wiki page
MDH Wiki页面
a guide to compatibility with other apps
与其他应用程序兼容性的指南
the MDH repository on GitHub.
GitHub上的MDH 存储库 。
I hope you've enjoyed this brief introduction to MDH. It's a pretty simple extension, but I use it every day, and honestly would hate to be without it.
希望您喜欢MDH的简短介绍。 这是一个非常简单的扩展,但是我每天都在使用它,说实话,我讨厌没有它。
Is this something you would consider using? Do you know of anything similar? Let me know in the comments.
这是您会考虑使用的东西吗? 你知道类似的东西吗? 在评论中让我知道。
翻译自: https://www.sitepoint.com/spicing-up-your-emails-with-markdown/
markdown 邮件
相关资源:jdk-8u281-windows-x64.exe