73 Commits

Author SHA1 Message Date
Le Tan
87c668bc67 fix Hoedown's toc
Hoedown will treat '_' in title as '<em>'.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-17 12:57:06 +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
5ff46d6237 implement insert image menu action
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-12 23:14:53 +08:00
Le Tan
66c1d543c2 synchronize current header in read and edit mode
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-12 21:58:53 +08:00
Le Tan
a884991150 refactor: add VMdEdit to inherit VEdit for markdown edit
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-11 14:42:01 +08:00
Le Tan
9a197b5087 refactor: add VNotebookSelector for notebook management
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-04 22:26:48 +08:00
Le Tan
fe4fb25105 VOutline: change current anchor when current item changed
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-03 20:26:05 +08:00
Le Tan
e7c42ba5be refactor: add VFile and VDirectory
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-30 22:58:00 +08:00
Le Tan
3722e6cb71 close all files before closing app
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-21 22:07:01 +08:00
Le Tan
ac2552603b clear unused images when finishing editing markdown
1. Clear existing images deleted by this edit;
2. Clear newly inserted images which were deleted before saving the
file;

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-20 21:48:07 +08:00
Le Tan
810d2f02f4 judge if equal in VOutline when updating curHeader
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-16 23:01:06 +08:00
Le Tan
62c75427e7 complete rename logics
1. Handle directory rename correctly;
2. Handle file rename correctly;

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-14 22:40:38 +08:00
Le Tan
5e97ca8060 display current file in window title
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-13 16:15:13 +08:00
Le Tan
dcc7e6a0f7 add vnote.qss for style sheet
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-13 08:05:43 +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
8a214831e3 fix outline navigation bug using Hoedown
Use a fixed base html and update the body using VDocument.html like
Marked does.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-09 21:43:11 +08:00
Le Tan
454072c9ba update current header in outline correctly
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-09 21:41:57 +08:00
Le Tan
849fdf05bd support synchronization between preview page and outline
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-08 23:21:22 +08:00
Le Tan
fe3d16ba3b change Marked's renderer to be identical with Hoedown
Change the style of the header to align with what Hoedown does (use id
as anchor).

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-08 22:08:18 +08:00
Le Tan
d1a3a9c386 support navigating by outline using Hoedown
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-07 22:40:43 +08:00
Le Tan
ae0130aa26 fix html toc parsing
Handle wrong notation such as header 3 under header 1 directly.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-07 22:12:16 +08:00
Le Tan
ab91f755c0 add dock widget to display outline
1. Support displaying outline of Markdown in read mode;
2. Support navigating by outline using Marked;

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-07 21:53:33 +08:00
Le Tan
29a41e8285 change VEditor to VEditTab
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-06 14:12:09 +08:00