sublime-evernote
sublime-evernote copied to clipboard
Hope for supporting more inline_css elements!
This is a great plugin for sublime text! A gift from heaven! I really appreciate your effort!
This plugin will be much pleasant if it support more inline_css elemetns! Below is what I need to support:
{"inline_css": {
"del":"position:relative;display:block",
"a" : "position: absolute;color: #FFF;text-decoration: none;font-size: 12px;height: 25px;border-radius: 0;margin-top: -30px;right: 15px;background: rgba(0, 0, 0, 0);border-left: 10px solid #BB3A34;border-right: 10px solid #BB3A34;border-bottom: 5px solid rgba(0, 0, 0, 0);width: 0;",
"div": "line-height: 1.6; font-family: Helvetica Neue, Arial, Hiragino Sans GB, STHeiti, Microsoft YaHei, WenQuanYi Micro Hei, SimSun, Song, sans-serif;",
"h1" : "font-size: 36px; margin: 0.67em 0; font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 0px; margin-bottom: 20px;",
"h3" : "font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 24px;",
"h4" : "font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 25px; margin-bottom: 15px; font-size: 18px;",
"p" : "margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;",
"strong" : "font-weight: bold;",
"ul" : "margin-top: 0; margin-bottom: 0; line-height: 1.6;",
"ol" : "margin-top: 0; margin-bottom: 10px; line-height: 1.6;",
"li" : "line-height: 1.6;",
"blockquote": "padding: 15px 20px; margin: 0 0 15px 0; font-size: 14px; border-left: 5px solid #ddd; background-color: rgba(102, 128, 153, 0.05);",
"hr": "-moz-box-sizing: content-box; box-sizing: content-box; height: 0; line-height: 1.6; margin-top: 20px; margin-bottom: 20px; border: 0; border-top: 1px solid rgba(102, 128, 153, 0.15);",
"a": "background: transparent;",
"code": "font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;",
"pre" : "overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;",
"span": "color: #a6e22e;",
"table": "border-collapse: collapse; border-spacing: 0; margin-bottom: 20px;",
"th": "text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;"
}}
Thanks for the compliment =)
I agree that ideally one would like to support every tag that can be put in a note (even more ideally one would like to support css style sheets but Evernote forbids the style tag and using a CSS engine to inline the relevant styles seems an overkill). I plan to migrate from markdown2 to mistune as backend markdown converter so I'll put this down as a requirement of the new backend (scheduled for version 3).
Thanks for the feedback!
I want change the mainbody text looks, so I add code in the inlinecss as below:
"p": "font-family: 'Helvetica Neue', Arial, 'Hiragino Sans GB', STHeiti, 'Microsoft YaHei', 'WenQuanYi Micro Hei', SimSun, Song, sans-serif; font-size: 1em; "
It just don't work. Is the "p" tag can't be supported, although it is permitted element according Evernote's DOC?
Hi @jflujin there's no specific reason why p
cannot be styled, it's just that adding styling requires changing the markdown2 parser script, which is cumbersome and error prone; so I've been doing that "on-demand".
The only supported styles right now are the ones already customised in the default Evernote.sublime-settings
file.
I'll add this in next release though as it seems a pretty reasonable element to style.
Thanks for your feedback! Evernote and Sublime text is my favorite, and You guys did wonderful work to make them work together. looking forward your updating.