12 Commits

Author SHA1 Message Date
Le Tan
a8614839d9 refactor image preview logics by adding VImagePreviewer
1. Support previewing non-relative local images;
2. Support previewing network images;
2017-05-06 12:25:18 +08:00
Le Tan
bd7f0e6cdd bugfix: abandon obsolete parsed highlight result when text has been changed 2017-04-19 22:32:58 +08:00
Le Tan
44257913f7 support code block syntax highlihgt in edit mode
In edit mode, highlight code blocks via parsing the result of HighlightJS.
We only highlight fenced code blocks by token-matching.

Support custom style in MDHL file.
2017-04-19 15:08:26 +08:00
Le Tan
238983ed0d refine all messages 2017-02-27 22:30:35 +08:00
Le Tan
8db54c45a4 bugfix: do not use reference to hold return value from capturedTexts()
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-25 22:54:13 +08:00
Le Tan
180ab46367 bugfix: highlight links and images with spaces in URL
It is said that URL should not contain spaces. Anyway, we use regular
expression syntax highlighting to complement PEG Markdown Highlight.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-22 19:39:43 +08:00
Le Tan
385abb3041 hide image preview block when selected
We do not want user to copy the image preview block (a special char).

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-31 14:13:42 +08:00
Le Tan
c44928e1d8 remove Ctrl+Alt Vim mode
1. Remove Ctrl+ALT Vim mode. Now Ctrl+D will enter the Vim mode
tempararily and only expires after NOT hitting commands for a while;
2. Add d and dd to delete text. 'd2j' is not supported;
3. x will cut the selected text.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-27 09:59:26 +08:00
Le Tan
a22bf1059d preview image links
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-17 12:38:01 +08:00
Le Tan
1a77056f4a support outline in edit mode
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-10 21:59:37 +08:00
Le Tan
51d0eedcb2 fix HGMarkdownHighlighter regular expression
Change the default markdown.css.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-25 10:21:31 +08:00
Le Tan
5fa07864a1 move source stuff into src subdir
Make it convenient to add third-party libraries.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-22 14:11:33 +08:00