Commit Graph

15 Commits

Author SHA1 Message Date
Felix Häusler
2686cfafe4 Update deps and automatically format style (#1168) 2019-07-24 10:57:21 +08:00
Ran Luo
c239e99f1b
Refactor inline image to support paste/drop image (#1028)
* feat: image setting

* opti: inline image

* add imageSelectAction

* remove axios from muya

* update image selector

* finish image selector ui

* add load success style

* delete image by click delete icon

* opti structure of image html

* handle arrow key

* enter to edit

* image preview by press space

* handle backspace when the previous element is image wrapper

* update codes for change another PC

* emable select all in input

* handle arrow and backspace key

* create a new paragraph after the last paragraph if its not empty

* handle backspace when the previous element is image wrapper

* handle enter event in image selector

* rewrite auto show image selector

* modify image folder

* copy file to folder

* select image

* handle paste image

* picgo

* guess image path from clipboard

* drag and drop image to Mark Text

* add github uploader

* remove unused codes

* remove unused codes

* rewrite image path auto complete

* support `path` imageInsertAction

* doc: add image uploader doc

* remove debug codes

* set init value in image uploader page

* fix typo

* remove unused codes

* drag web image to Mark Text

* add save notification

* opti uploading process

* fix did not close image selector bug

* check image content type when drag web link image

* fix: unable to preview relative path image.

* emit change event after paste/drop image

* add url map in image selector

* feat: screenshot and auto insert the screenshot image

* update error handler

* feat: use the native screencapture command line on macOs system

* opti: drop image

* fix: handle enter error when cursor is after a image

* fix: hasOwnProperty error

* remove debug codes

* fix: backspace when the previous ele is image

* fix: CI error and optimize some codes

* use hash of file path to generate the copied filename

* change default imageInsertAction to `path`

* fix: typo

* remove some unused codes and opti get image file name

* fix some bugs and opti codes

* update image edit icon

* romove screen capture on Linux and Windows

* fix: conflict

* fix error that can not insert image after the existed image or before existed image
2019-05-26 23:55:13 +08:00
Ran Luo
230c90c920
container block preview and inline syntax error (#992)
* opti: container block preview

* remove unused codes

* rewrite createBlock method

* remove ag-line classname

* just push codes

* hand enter + shift in paragraph

* update import markdown and export markdown

* update part updateCtrl

* update indent code block

* auto indent when press shift + enter

* update thematic break

* update inline syntax update reg

* update list and task list

* update atx heading and setext heading

* update paragraph

* update block quote

* adjust cursor in heading

* update codes

* paragraph turn into feature check

* check copy paste

* update turn into

* fix: delete last # error

* fix: turn setext heading to atx heading error

* fix: delete thematic break error

* paste and copy

* workarond turndown to support soft line break

* fix: unable create table

* modify export markdown

* modify test markdown

* fix: cursor error when update blockquote

* readd cursor check when dispatch changes

* fix: inline math create a lot extra char

* add code cache clear after each render

* fallback to prismjs2
2019-05-04 23:41:46 +08:00
Ran Luo
d71647fc9a opti: style in editor (#969)
* opti: style in editor

* change float box shadow

* add border to float box

* little code opti

* opti image style

* update style

* change code block bg color

* fix: update style

* opti codes
2019-04-26 22:33:29 +02:00
Ran Luo
8b04b4c34a
Diagram (#914)
* add theme support of diagram

* add init mermaidTheme and vegaTheme when init muya

* export diagram

* update changelog

* add delete icon

* replace table toolbar icon to png

* replace icons in fromt menu and quick insert

* update format icons to png

* add theme support of diagram

* add init mermaidTheme and vegaTheme when init muya

* export diagram

* update changelog

* add delete icon

* replace table toolbar icon to png

* replace icons in fromt menu and quick insert

* update format icons to png

* update front icon hover color

* adjust format box icon size

* prevent some warning and rerender after change from source code

* remove debug code and replace image icon
2019-04-13 00:40:23 +08:00
Ran Luo
4e918503f4 feat: add front menu (#875)
* feat: add front menu

* update changelog

* feat: add short cut of paragraph edit

* fix location bug of submenu

* update checkbox style in editor

* update selected background color

* update KEYBINDINGS.md

* Bullet to ordered list issue:

* emit change event after control paragraph

* fix: marked parse error

* disable table, front-matter and horizontal line in paragraph turn into, and fixed paragraph turn into html and math

* fix unwanted space before text paragraph when heading turn into text paragraph

* fix error when turn heading to paragraph

* put front menu on the left on front icon

* update readme

* if the selection span in two lnes, disable paragraph turn into heading
2019-04-07 16:16:49 +02:00
Ran Luo
a2786b13d2
fix: #857 #854 (#864) 2019-04-04 23:22:04 +08:00
Ran Luo
a395982faa fix: #432 (#800)
* fix: #432

* update change log

* update changelog
2019-03-25 00:05:04 +01:00
jocs
c169a7704e update: delete unused codes 2019-01-15 10:25:59 +08:00
jocs
d5eb560435 delete some unused codes 2019-01-14 21:47:03 +08:00
jocs
275cd12800 opti: hide vega-embed 2018-11-12 11:19:47 +08:00
jocs
41dd6db301 fix: #541 2018-11-05 23:13:37 +08:00
Ran Luo
55092ff15d
[WIP] Support Diagram (#529)
* feat: basic use of mermaid

* feat: add flowchart dep

* feat: handle flowchart render error

* feat: edit sequence diagram

* feat: support vega-lite

* fix: #534

* feat: basic use of mermaid

* feat: add flowchart dep

* feat: handle flowchart render error

* feat: edit sequence diagram

* feat: support vega-lite

* feat: copy paste and import and export of diagram

* finish

* fix: #537

* update: dependence
2018-11-01 22:42:34 +08:00
Ran Luo
39e1ea8081
Prism replace codemirror (#516)
* feat: basic use of code block by prism

* opti: remove codemirror from muya

* feat: add highlight to math and frontmatter

* feat: import and export in math block, html block, frontmatter, code block

* update: paragraph ctrl

* feat: copy and paste in new math block and html block

* feat: update code block style in dark theme

* feat: search and replace in code block

* fix: update menu item status when selection changed

* opti: optimization of updateCtrl divide it into clickCtrl and inputCtrl

* opti: search and replace in code block when no lang selected

* opti: copy paste in code block

* feat: insert paragraph before or after code block

* opti: change emoji.js to emoji.json

* feat: auto indent in code block

* opti: auto indent in code block

* opti: remove the use of snabbdom-virtualize

* fix: do not show format float box in code block

* opti: emoji picker

* update: delete some unused codes

* update: electron

* use a temp prismjs2 instead of prismjs
2018-10-23 21:21:58 +08:00
Ran Luo
405d04ce19
package and release muya (#413) 2018-07-07 00:10:30 +08:00