1875 Commits

Author SHA1 Message Date
Le Tan
1b220efb64 change default markdown highlight styles
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-13 21:03:30 +08:00
Le Tan
d22f0124d3 add VStyleParser as a wrapper of pmh_styleparser
Use VStyleParser to read .mdhl style file for markdown highlighting.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-13 17:08:39 +08:00
Le Tan
33f62915e1 clean up HGMarkdownHighlighter
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-12 21:05:41 +08:00
Le Tan
22bf96c6e3 add peg-markdown-highlight for markdown editing highlight
[peg-markdown-highlight](https://github.com/ali-rantakari/peg-markdown-highlight.git)

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-11 23:23:11 +08:00
Le Tan
772e0e95c8 speed up html displaying
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-11 22:17:51 +08:00
Le Tan
1cd8a9740d modify markdown html CSS
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-11 21:24:29 +08:00
Le Tan
96dffa3a8c fix template.html
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-11 09:42:11 +08:00
Le Tan
8e3e78622a utilize highlight.js to highlight code blocks
Use [Highlight.js](https://github.com/isagalaev/highlight.js.git) to
highlight code blocks.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-10 22:51:19 +08:00
Le Tan
daeed51f94 add TOC support to marked
Use `[TOC]` in markdown to generate a table of content.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-10 22:07:54 +08:00
Le Tan
e1c2204733 Set TextCodec to UTF8
For now QTextEdit seems handle the Chinese correctly.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-10 17:04:27 +08:00
Le Tan
321289c8e0 add VNote::editorAndBrowserFont for setting font in QTextEdit and QTextBrowser
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-09 22:37:45 +08:00
Le Tan
5ff4382f90 support for local image in markdown
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-09 22:06:55 +08:00
Le Tan
7bce2cb298 use QWebEngineView to display markdown files
Thanks to [marked JavaScript library](https://github.com/chjj/marked) by
Christopher Jeffrey. The
[style sheet](http://kevinburke.bitbucket.org/markdowncss/markdown.css)
was created by Kevin Burke.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-09 20:47:20 +08:00
Le Tan
4260962e23 add submodules marked from Christopher Jeffrey
Add submodules marked from https://github.com/chjj/marked.git.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-07 22:13:38 +08:00
Le Tan
e3e18d040c use QStackedWidget to hold QTextBrowser and VEdit
Use QTextBrowser to display file in read mode and VEdit to display file
in edit mode.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-07 21:55:30 +08:00
Le Tan
b55ebe8f91 use itemClicked signal instead of currentItemChanged to trigger opening a file
This will handle the corner case: when user open file "f" and close it,
this file is still current item, so if user want to re-open it by
clicking on it, it won't work.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-07 11:07:43 +08:00
Le Tan
3f8c87a325 add basic logics for handling html file
Add edit/read/save logics for html file.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-07 10:56:28 +08:00
Le Tan
504e3323cf display selected file in a QTabWidget
Add VTabWidget and VEdit to display content of files.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-06 22:33:55 +08:00
Le Tan
b47c9f3368 bug-fix: currentItemChanged() may have NULL pointer
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-06 13:30:42 +08:00
Le Tan
9dd22760fc add VFileList to browse the files in current directory
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-06 12:55:00 +08:00
Le Tan
0f7f433833 move config logics to VConfigManager
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-05 17:13:40 +08:00
Le Tan
5d08a6f93d implement delete directory action to VDirectoryTree
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-05 15:19:17 +08:00
Le Tan
09f6415536 implement VDirectoryTree logics
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-05 14:28:48 +08:00
Le Tan
d8c5114c1b read/write the info about notebooks
Use QSettings to store notebooks info in INI format.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-02 13:38:05 +08:00
Le Tan
811172ef8a initial commit for VNote
VNote is a Vim-Like Note for Markdown.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-01 15:45:27 +08:00