Created
July 25, 2016 02:04
-
-
Save tallykatt/80d2228a8c57afce0cbe703c7b88c6e5 to your computer and use it in GitHub Desktop.
Evernote Note Highlighter.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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