我一直在用Autohotkey增强印象笔记的编辑器,最终效果类似 (抱歉不重新截中文图了):

基本能用,但是,一直有Bug:

图可能不清楚,就是说有时候刷不上格式;对多行刷格式时,也可能样式错位。
暂时猜测,可能是内联样式的优先级最高,导致包裹在外面的标签中,定义的内联样式没有生效(!Important经测试也无效)。
这个脚本天天用,所以有Bug还是挺烦的。有熟悉HTML/CSS的盆友能帮忙看看吗?怎么完善?
主要代码:
;把原先的文本,带格式拷出来,外面裹上新格式html,再粘贴回去
evernoteEdit(eFoward, eEnd)
{
clipboard =
Send ^c ;copy chosen text in evernote
ClipWait, ,
t := WinClip.GetHTML_DOM() ;get text with format from clipbd
html = %eFoward%%t%%eEnd% ;add new format
WinClip.Clear()
WinClip.SetHTML(html) ;return new format text to clipbd
Sleep, 300
Send ^v ;paste to evernote
Return
}
#1::evernoteEdit("<div style='color: #F02E37;'><b>", "</b></div>")
!1::evernoteEdit("<div style='background: #FFFAA5;'>", "</div>")
!f::evernoteEdit("<div style='margin-top: 5px; margin-bottom: 9px; word-wrap: break-word; padding: 8.5px; border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(245, 245, 245); border: 1px solid rgba(0, 0, 0, 0.148438)'>", "</div>")