org-protocol formatting selected text

≯℡__Kan透↙ 提交于 2019-12-22 18:26:10

问题


When you capture through org-protocol and a browser, either through the capture(); function or encodeURIComponent(window.getSelection());, the text appears to be passed to the Emacs org-protocol server as plain text.

Is there a way to pull in some of the HTML heading/CSS style info to keep a minimal amount of formatting for readability? Most sites aren't anything close to plain text, so even selecting across a heading and a couple paragraphs comes out like garbage.

edit: I found pandoc, which will do HTML to org-mode conversions, but the results are overkill. Is there any way to get just the formatting from the selected objects, not a blind parse of HTML chunk?

来源:https://stackoverflow.com/questions/19168926/org-protocol-formatting-selected-text

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!