Skip to content

TolgaTatli/inkdrop-mark-text

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

inkdrop-mark-text

Updated version of inkdrop-highlight-text

A plugin for Inkdrop that implements the Markdown text highlighting extension. It parses text enclosed by == and renders it as marked text.

Motivation

Having used Evernote in the past I really missed the ability to highlight text in Inkdrop. In contrast to strong and emphasis, marking text in that manner also conveys a different meaning as the MDN web docs nicely point out:

Don’t confuse <mark> with the <strong> element; <mark> is used to denote content which has a degree of relevance, while <strong> indicates spans of text of importance.

As people often copy text from the web into their notes and like to annotate it, you can make the case that Github Flavored Markdown is lacking in its syntax to adequately support this use case with respect to note taking.

Install

ipm install mark-text

Usage

Here is an example showcasing text highlighting in conjuction with blockquotes:

> ==To be, or not to be==, that is the question

usage example

You can add a keymapping (keyboard shortcut) that allows you to highlight selected text. Please note that it is not active by default. You have to enable it by adding a keymapping to your keymap.cson like so:

'body':
  'ctrl-m': 'mark-text:toggle'

Compatibility

Keep in mind that text highlighting is not part of the official CommonMark or Github Flavored Markdown specification. Therefore using the == syntax to highlight text might be ignored by other Markdown readers and as a result carry over to the rendered text.

Fortunately many Markdown-enabled applications support text highlighting as an experimental feature, see here, here, here and also here. Despite lacking formal specification the syntax can be considered stable at this point and is unlikely to change.

Theming support

Theme developers can use the CSS selector .mde-preview mark for styling.

Acknowledgments

  • This plugin relies on remark-mark by moyuyc
  • Special thanks to the developers of zmarkdown for general help on remark plugin development and @craftzdog for promoting the idea

About

Markdown text highlighting extension for Inkdrop

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published