Skip to content

Instantly share code, notes, and snippets.

@tallykatt
Created July 25, 2016 02:04
Show Gist options
  • Save tallykatt/80d2228a8c57afce0cbe703c7b88c6e5 to your computer and use it in GitHub Desktop.
Save tallykatt/80d2228a8c57afce0cbe703c7b88c6e5 to your computer and use it in GitHub Desktop.
Evernote Note Highlighter.
// This little thing make the selected text highlight on Evernote Note screen
// I really like the new Evernote Note screen, So I thought it would be very nice if selection tool has highlight button.
// So I did create this bookmarklet to add/remove highlight selected text
javascript:(function(selectElem){var jQ = tinymce.dom.DomQuery,node = jQ(tinyMCE.activeEditor.selection.getNode());if (node.is("span") && node.hasClass("highlighted")){ jQ(selectElem.getNode()).contents().unwrap() }else{selectElem.setContent("<span class=\"highlighted\" style=\"padding: 3px 0px; border:none; background: #c9f2d0;\">" + selectElem.getContent()+ "</span>");}})(tinyMCE.activeEditor.selection);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment