id: d2039663ea7e47bb895d6d7224a3f61b
parent_id: 
item_type: 1
item_id: c38e2c7bfde745bdbddeb9b17f2a0f06
item_updated_time: 1764345478603
title_diff: "[{\"diffs\":[[1,\"【开源】2md：将复制的内容、网页转成 markdown-科技频道-手机搜狐\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":38}]"
body_diff: "[{\"diffs\":[[1,\"<html>\\\r\\\n<head>\\\r\\\n  <title>【开源】2md：将复制的内容、网页转成 markdown-科技频道-手机搜狐</title>\\\r\\\n  <basefont face=\\\"微软雅黑\\\" size=\\\"2\\\" />\\\r\\\n  <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html;charset=utf-8\\\" />\\\r\\\n  <meta name=\\\"exporter-version\\\" content=\\\"YXBJ Windows/608924 (zh-CN, DDL); Windows/10.0.0 (Win64); EDAMVersion=V2;\\\"/>\\\r\\\n  <meta name=\\\"application-data:ANDROID_CLIP_TYPE\\\" content=\\\"article\\\"/>\\\r\\\n  <style>\\\r\\\n\\tbody, td {\\\r\\\n\\t  font-family: 微软雅黑;\\\r\\\n\\t  font-size: 12pt;\\\r\\\n\\t}\\\r\\\n  </style>\\\r\\\n</head>\\\r\\\n<body>\\\r\\\n<a name=\\\"13332\\\"></a>\\\r\\\n<h1>【开源】2md：将复制的内容、网页转成 markdown-科技频道-手机搜狐</h1>\\\r\\\n\\\r\\\n<div><span style=\\\"word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;\\\"><div style=\\\"font-size: 16px\\\"><div style=\\\"font-size:160px;user-select:text;\\\"><div style=\\\"text-size-adjust:none;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:14px;line-height:1.5;font-family:helvetica, verdana, san-serif;outline:0px;color:rgb(51, 51, 51);background:rgb(255, 255, 255);user-select:text;background-color:rgb(242, 242, 242);\\\"><div style=\\\"background-color:rgb(249, 249, 249);\\\"><div style=\\\"color:rgb(43, 43, 43);\\\">\\\n                \\\n                <h1 style=\\\"padding:0px;margin:0px;border:0px;font-size:26px;font-weight:700;font-style:normal;padding-left:13px;padding-right:13px;padding-top:25px;line-height:30px;\\\">【开源】2md：将复制的内容、网页转成 markdown</h1>\\\n                \\\n                <div style=\\\"padding:10px 13px 30px;margin:0px;border:0px;zoom:1;line-height:20px;color:rgb(164, 164, 164);\\\">\\\n                        <span style=\\\"margin-right:6px;\\\">搜狐媒体平台</span>\\\n                    <span style=\\\"margin-right:6px;\\\">04-17 21:12</span>\\\n                    <a href=\\\"#\\\" style=\\\"text-decoration:none;color:rgb(96, 152, 212);display:block;float:right;margin:0px;\\\">\\\n                        <i style=\\\"font-size:17px;font-weight:400;font-style:normal;display:inline-block;vertical-align:top;line-height:1;speak:none;text-decoration:inherit;text-transform:none;text-rendering:auto;-webkit-font-smoothing:antialiased;margin-right:-1px;color:rgb(255, 221, 0);\\\"><span style=\\\"font-size:17px;font-weight:400;font-style:normal;line-height:1;text-transform:none;color:rgb(255, 221, 0);font-family:icons;\\\"></span></i>\\\n                        <span style=\\\"color:rgb(164, 164, 164);\\\">大</span>\\\n                    </a>\\\n                <span style=\\\"line-height:0;color:rgb(164, 164, 164);display:block;height:0px;font-size:0px;visibility:hidden;clear:both;\\\"></span></div>\\\n                \\\n\\\n                \\\n\\\n                \\\n                <p style=\\\"padding:0px;margin:0px;border:0px;padding-left:13px;padding-right:13px;margin-bottom:20px;text-align:justify;font-size:18px;word-wrap:break-word;\\\"></p><blockquote><p style=\\\"padding:0px;margin:0px;border:0px;\\\"> 如果一个Markdown编辑器不能解决问题，那么就用两个编辑器。</p></blockquote><p style=\\\"padding:0px;margin:0px;border:0px;\\\"></p><p style=\\\"padding:0px;margin:0px;border:0px;padding-left:13px;padding-right:13px;margin-bottom:20px;text-align:justify;font-size:18px;word-wrap:break-word;\\\">作为一个作者、程序员，兼知名的markdown程序员，我总是要在Markdown、HTML、PDF各种格式之间进行转换。</p><p style=\\\"padding:0px;margin:0px;border:0px;padding-left:13px;padding-right:13px;margin-bottom:20px;text-align:justify;font-size:18px;word-wrap:break-word;\\\">因为日常工作的一些使用需要，我也创建了各种的轮子：</p><div style=\\\"padding:0px;margin:0px;border:0px;\\\"><div style=\\\"padding:0px;margin:0px;border:0px;\\\"></div><div style=\\\"padding:0px;margin:0px;border:0px;\\\"></div></div><p style=\\\"padding:0px;margin:0px;border:0px;padding-left:13px;padding-right:13px;margin-bottom:20px;text-align:justify;font-size:18px;word-wrap:break-word;\\\">如 基于 markdown 一步生成电子书: 支持PDF、Mobi、EPUB格式。</p><p style=\\\"padding:0px;margin:0px;border:0px;padding-left:13px;padding-right:13px;margin-bottom:20px;text-align:justify;font-size:18px;word-wrap:break-word;\\\">如 MDPub，用于微信公众号的 markdown 编辑器，主要是用于提供代码高亮：</p><p style=\\\"padding:0px;margin:0px;border:0px;padding-left:13px;padding-right:13px;margin-bottom:20px;text-align:justify;font-size:18px;word-wrap:break-word;\\\"></p><div style=\\\"padding:0px;margin:0px;border:0px;margin-bottom:23px;\\\">\\\n                <div style=\\\"padding:0px;margin:0px;border:0px;\\\">\\\n                    <img src=\\\":/46b0e77e0dc14b5983bce71f448474e7\\\" type=\\\"image/jpeg\\\" data-filename=\\\"d0d76e7e6f320363521eb2a68a577cb8.jpg\\\"/>\\\n                </div>\\\n                <div style=\\\"padding:0px 40px;margin:8px 0px 30px;border:0px;position:relative;z-index:1;line-height:20px;color:rgb(164, 164, 164);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;\\\">\\\n                    <i style=\\\"font-size:1em;font-weight:400;font-style:normal;float:left;background-image:url(&quot;https://s6.rr.itc.cn/h5/msohu/v3/master/css/c/url(../../i/sprites/icons_built/icons@2x_a20acfd826.png)&quot;);background-repeat:no-repeat;background-size:296px 243px;background-position:-126px -26px;width:20px;height:20px;position:absolute;left:13px;top:0px;display:block;\\\"></i>\\\n                    <span></span>\\\n                </div>\\\n             </div><p style=\\\"padding:0px;margin:0px;border:0px;padding-left:13px;padding-right:13px;margin-bottom:20px;text-align:justify;font-size:18px;word-wrap:break-word;\\\">MDPub 截图</p><p style=\\\"padding:0px;margin:0px;border:0px;padding-left:13px;padding-right:13px;margin-bottom:20px;text-align:justify;font-size:18px;word-wrap:break-word;\\\">今天，我修复一个 MDPub 的 bug 时，突然意识到我也有将一篇文章转为 Markdown 的需要。</p><p style=\\\"padding:0px;margin:0px;border:0px;padding-left:13px;padding-right:13px;margin-bottom:20px;text-align:justify;font-size:18px;word-wrap:break-word;\\\">2md</p><p style=\\\"padding:0px;margin:0px;border:0px;padding-left:13px;padding-right:13px;margin-bottom:20px;text-align:justify;font-size:18px;word-wrap:break-word;\\\">以前，当我需要将 HTML 转为 Markdown 的时候，我会使用 to-markdown 的 Demo 网页，来转换相应的 HTML 为 Markdown。可是，这意味着我需要我复制到 HTML，才能转为 Markdown。</p><p style=\\\"padding:0px;margin:0px;border:0px;padding-left:13px;padding-right:13px;margin-bottom:20px;text-align:justify;font-size:18px;word-wrap:break-word;\\\">因此，我便想着：<strong style=\\\"margin-right:10px;font-weight:700;\\\">如果可以直接用鼠标选中，然后 Ctrl + C、Ctrl + V 的话，就更简单了。</strong></p><p style=\\\"padding:0px;margin:0px;border:0px;padding-left:13px;padding-right:13px;margin-bottom:20px;text-align:justify;font-size:18px;word-wrap:break-word;\\\">而，实际上，我只需要一个 WYSIWYG 编辑器，然后再将内容转为 Markdown 就可以了。</p><p style=\\\"padding:0px;margin:0px;border:0px;padding-left:13px;padding-right:13px;margin-bottom:20px;text-align:justify;font-size:18px;word-wrap:break-word;\\\">因此，就有了 2md：</p><p style=\\\"padding:0px;margin:0px;border:0px;padding-left:13px;padding-right:13px;margin-bottom:20px;text-align:justify;font-size:18px;word-wrap:break-word;\\\"></p><div style=\\\"padding:0px;margin:0px;border:0px;margin-bottom:23px;\\\">\\\n                <div style=\\\"padding:0px;margin:0px;border:0px;\\\">\\\n                    <img src=\\\":/4d04720bbd5f498b8acc1b81ecf2a731\\\" type=\\\"image/jpeg\\\" data-filename=\\\"6b34185e36f20c85df550ba00225ca3e.jpg\\\"/>\\\n                </div>\\\n                <div style=\\\"padding:0px 40px;margin:8px 0px 30px;border:0px;position:relative;z-index:1;line-height:20px;color:rgb(164, 164, 164);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;\\\">\\\n                    <i style=\\\"font-size:1em;font-weight:400;font-style:normal;float:left;background-image:url(&quot;https://s6.rr.itc.cn/h5/msohu/v3/master/css/c/url(../../i/sprites/icons_built/icons@2x_a20acfd826.png)&quot;);background-repeat:no-repeat;background-size:296px 243px;background-position:-126px -26px;width:20px;height:20px;position:absolute;left:13px;top:0px;display:block;\\\"></i>\\\n                    <span></span>\\\n                </div>\\\n             </div><p style=\\\"padding:0px;margin:0px;border:0px;padding-left:13px;padding-right:13px;margin-bottom:20px;text-align:justify;font-size:18px;word-wrap:break-word;\\\">2MD 截图</p><p style=\\\"padding:0px;margin:0px;border:0px;padding-left:13px;padding-right:13px;margin-bottom:20px;text-align:justify;font-size:18px;word-wrap:break-word;\\\">一如即往的，保持了简洁的风格。并且，它的代码也足够的简单：</p><p style=\\\"padding:0px;margin:0px;border:0px;padding-left:13px;padding-right:13px;margin-bottom:20px;text-align:justify;font-size:18px;word-wrap:break-word;\\\"></p><ol style=\\\"padding:0px;margin:0px;border:0px;list-style:none;\\\">  <li style=\\\"padding:0px;margin:0px;border:0px;list-style:none;\\\"><p style=\\\"padding:0px;margin:0px;border:0px;\\\"><span>tinymce.init({</span></p></li>  <li style=\\\"padding:0px;margin:0px;border:0px;list-style:none;\\\"><p style=\\\"padding:0px;margin:0px;border:0px;\\\"><span>selector: </span><span>'textarea#input'</span><span>,</span></p></li>  <li style=\\\"padding:0px;margin:0px;border:0px;list-style:none;\\\"><p style=\\\"padding:0px;margin:0px;border:0px;\\\"><span>height: </span><span>500</span><span>,</span></p></li>  <li style=\\\"padding:0px;margin:0px;border:0px;list-style:none;\\\"><p style=\\\"padding:0px;margin:0px;border:0px;\\\"><span>menubar: </span><span>false</span><span>,</span></p></li>  <li style=\\\"padding:0px;margin:0px;border:0px;list-style:none;\\\"><p style=\\\"padding:0px;margin:0px;border:0px;\\\"><span>statusbar: </span><span>false</span><span>,</span></p></li>  <li style=\\\"padding:0px;margin:0px;border:0px;list-style:none;\\\"><p style=\\\"padding:0px;margin:0px;border:0px;\\\"><span>toolbar: [</span><span>'code'</span><span>],</span></p></li>  <li style=\\\"padding:0px;margin:0px;border:0px;list-style:none;\\\"><p style=\\\"padding:0px;margin:0px;border:0px;\\\"><span>plugins: [</span></p></li>  <li style=\\\"padding:0px;margin:0px;border:0px;list-style:none;\\\"><p style=\\\"padding:0px;margin:0px;border:0px;\\\"><span></span><span>'advlist autolink lists link image charmap print preview anchor'</span><span>,</span></p></li>  <li style=\\\"padding:0px;margin:0px;border:0px;list-style:none;\\\"><p style=\\\"padding:0px;margin:0px;border:0px;\\\"><span></span><span>'searchreplace visualblocks code fullscreen'</span><span>,</span></p></li>  <li style=\\\"padding:0px;margin:0px;border:0px;list-style:none;\\\"><p style=\\\"padding:0px;margin:0px;border:0px;\\\"><span></span><span>'insertdatetime media table contextmenu paste code'</span></p></li>  <li style=\\\"padding:0px;margin:0px;border:0px;list-style:none;\\\"><p style=\\\"padding:0px;margin:0px;border:0px;\\\"><span>],</span></p></li>  <li style=\\\"padding:0px;margin:0px;border:0px;list-style:none;\\\"><p style=\\\"padding:0px;margin:0px;border:0px;\\\"><span>setup: </span><span>function</span><span>(editor) {</span></p></li>  <li style=\\\"padding:0px;margin:0px;border:0px;list-style:none;\\\"><p style=\\\"padding:0px;margin:0px;border:0px;\\\"><span>editor.on(</span><span>'change'</span><span>, </span><span>function</span><span>(e) {</span></p></li>  <li style=\\\"padding:0px;margin:0px;border:0px;list-style:none;\\\"><p style=\\\"padding:0px;margin:0px;border:0px;\\\"><span></span><span>var</span><span>content = tinymce.</span><span>get</span><span>(</span><span>'input'</span><span>).getContent();</span></p></li>  <li style=\\\"padding:0px;margin:0px;border:0px;list-style:none;\\\"><p style=\\\"padding:0px;margin:0px;border:0px;\\\"><span></span><span>var</span><span>md = toMarkdown(content);</span></p></li>  <li style=\\\"padding:0px;margin:0px;border:0px;list-style:none;\\\"><p style=\\\"padding:0px;margin:0px;border:0px;\\\"><span>$(</span><span>&quot;#output&quot;</span><span>).val(md);</span></p></li>  <li style=\\\"padding:0px;margin:0px;border:0px;list-style:none;\\\"><p style=\\\"padding:0px;margin:0px;border:0px;\\\"><span>});</span></p></li>  <li style=\\\"padding:0px;margin:0px;border:0px;list-style:none;\\\"><p style=\\\"padding:0px;margin:0px;border:0px;\\\"><span>}</span></p></li>  <li style=\\\"padding:0px;margin:0px;border:0px;list-style:none;\\\"><p style=\\\"padding:0px;margin:0px;border:0px;\\\"><span>});</span></p></li>  <li style=\\\"padding:0px;margin:0px;border:0px;list-style:none;\\\">  </li><li style=\\\"padding:0px;margin:0px;border:0px;list-style:none;\\\"><p style=\\\"padding:0px;margin:0px;border:0px;\\\"><span>$(</span><span>'document'</span><span>).ready(</span><span>function</span><span>() {</span></p></li>  <li style=\\\"padding:0px;margin:0px;border:0px;list-style:none;\\\"><p style=\\\"padding:0px;margin:0px;border:0px;\\\"><span></span><span>new</span><span></span><span>Clipboard</span><span>(</span><span>'.btn'</span><span>);</span></p></li>  <li style=\\\"padding:0px;margin:0px;border:0px;list-style:none;\\\"><p style=\\\"padding:0px;margin:0px;border:0px;\\\"><span>});</span></p></li> </ol><p style=\\\"padding:0px;margin:0px;border:0px;\\\"></p>\\\n\\\n                    \\\n\\\n                \\\n\\\n                <div style=\\\"padding:0px;margin:0px;border:0px;text-align:center;\\\">\\\n                    <a href=\\\"#\\\" style=\\\"text-decoration:none;color:rgb(240, 164, 0);\\\">\\\n                        <span>展开剩余27%</span>\\\n                        <span style=\\\"background-image:url(&quot;https://s6.rr.itc.cn/h5/msohu/v3/master/css/c/url(../../i/sprites/icons_built/icons@2x_a20acfd826.png)&quot;);background-repeat:no-repeat;background-size:296px 243px;background-position:-278px -209px;width:14px;height:8px;display:inline-block;\\\"></span>\\\n                    </a>\\\n                </div>\\\n            </div></div></div></div></div></span>\\\n</div></body></html>\\u0000\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":12913}]"
metadata_diff: {"new":{"id":"c38e2c7bfde745bdbddeb9b17f2a0f06","parent_id":"061de1401cfc4cfaadf6e74e015970e9","latitude":"0.00000000","longitude":"0.00000000","altitude":"0.0000","author":"","source_url":"","is_todo":0,"todo_due":0,"todo_completed":0,"source":"joplin-desktop","source_application":"net.cozic.joplin-desktop","application_data":"","order":1764345812523,"markup_language":2,"is_shared":0,"share_id":"","conflict_original_id":"","master_key_id":"","user_data":"","deleted_time":0},"deleted":[]}
encryption_cipher_text: 
encryption_applied: 0
updated_time: 2025-11-28T16:20:17.105Z
created_time: 2025-11-28T16:20:17.105Z
type_: 13