Commit Graph

39 Commits

Author SHA1 Message Date
Ran Luo
7377de3c12
Feat footnote (#1546)
* feat: footnote identifer

* feat: add update to footnote

* modify some style

* Create footnote from identifier and backlink

* handle backspace in footnote

* export markdown

* add export html

* add export style

* modify style

* feat: add footnote setting option

* fix some bugs

* feat: fix [^longnote] is not auto numbered in exported document but in footnotes.

* Enter to create footnote

* modify some style of footnote

* update footnote icon and add highlight format icon button

* fix #1568
2019-11-02 22:51:05 +08:00
Ran Luo
07ef9cba0f Fix 1551, and also fix no need heading rules in table cell (#1558)
* Fix 1551, and also fix no need heading rules in table cell

* no need to hide heading # in table cell
2019-11-02 15:18:58 +01:00
罗冉
38d24056c4 Enter to create footnote 2019-10-30 12:42:39 +08:00
Ran Luo
c6708e9d9a
fix: #1540 (#1542)
* fix: #1540

* adjust style
2019-10-27 01:04:18 +08:00
Ran Luo
8e32838b8a Feature: support markdown extension superscript and subscript (#1531)
* Feature: support markdown extension superscript and subscript

* Update readme file

* Fix: theme setting error

* fix issue in comment

* Fix some typo
2019-10-26 17:15:49 +02:00
Ran Luo
41a2343e0f
Lazy load some big assets and optimize the bundle size (#1481)
* Use snap.svg to replace raphael

* lazy load diagram

* rm debug codes

* Use throw exception instead of console.error
2019-10-20 11:56:11 +08:00
Felix Häusler
603ed04ab1 Add experimental spellchecker (#1424)
* Experimental spellchecker for testing purpose

* Fix 'apache' license validation

* Use local electron-spellchecker for development

* Add settings and bug fixes

* Fix Hunspell switchLanguage bug and improvements

* Fix attach to editor when enabling spell check again

* Add Hunspell license

* Copy default Huspell dictionary on first start

* Fix full language name

* Some code improvements

* Allow to add words to user dict and  bug fixes

* Allow to change Muya's spellcheck container attribute

* feat: Don't underline misspelled words

* Allow to set Hunspell on macOS

* Fix spellchecker changed value

* Refactor switchLanguage, init and enableSpellchecker

* Refactor and some fixes

* Code improvements

* electron-spellchecker cleanup and optimization

* Disable automatic language detection for Hunspell

* Fix init on macOS and update JSDoc

* Fix macOS issues and some improvements

* Load single settings value only

* Fix rebase

* Remove debug code

* Move electron-spellchecker to scoped npm repo

* Fix dictionary of ignored words on macOS

* Move replaceWordInline to core API

* Remove comment block

* Fix upstream lint error
2019-10-17 15:54:09 +08:00
Ran Luo
289b17c015 Optimization of table block (#1456)
* Prepare for drag and drop row and column

* remove regexp th|td

* render drag button

* Feat: support drag and drop row and column of table

* Feat: table bar tools

* remove unnecessary codes

* Feat: support select multiple cells

* Do not show table drag bar when selected cells

* Feat: support delete selected cells content or remove row/column/table

* Feat: select one cell or table when press ctrl + a

* Support select all content

* Remove table tools in context menu

* Feat: support copy paste selected cells as sub table

* Fix: PR issue 1 press tab will not show the table drag bars

* Select one cell and press backspace will cause bug

* Fix: The table drag bar location error when there are tow tables in the editor

* Fix unable copy and paste 1* n or n * 1 table

* Drag any row to the top to editor will cause error.

* Update table resize icon

* Fix: table resize is not work in table tool bar

* Fix: No need to show left drag bar if only one row, and no need to show bottom drag bar if only one column.

* Fix: Create an empty table in source code mode, turn to preview mode, there are more than two drag bars in one table.

* Fix: resize table

* Opti: table is not 100% width now

* Fix drag in one row or column

* Change table delete icon

* Fix: backspace is not work

* Little style opti

* Fix: cmd + enter bug

* Update the table drag bar context menu text

* Handle delete key when select table cells

* remove all unnecessary debug codes

* Feat: support cut selected cells and copy/cut by context menu

* Fix typo

* Rename some methods name

* Fix an issue when drag and drop table drag bar

* fix do not handle cell selection when the context menu shown

* Do not handle select cells when mouse up outside table
2019-10-13 13:23:00 +02:00
Ran Luo
5b8da2cdf4
Optimization of code block (#1445)
* duplicate css rule

* remove all codeLine

* Fix: #1446

* Fix #942 #1310

* Fix copy paste will add one more empty line in code block

* remove debug codes

* Fix update thematic break error

* fix: #1447

* Update octokit/rest and url-loader

* Fix: CI test error

* Fix comment issue1

* Fix: escape charachters in code block
2019-10-08 14:12:51 +08:00
Ran Luo
46371f8c56
Update Babel to 7.x.x (#1253)
* update deps

* update babel

* add babel-runtime

* update config file

* update config file

* modify config

* modify some codes

* update some dependences

* Update allowed licenses validate
2019-09-01 03:30:01 +08:00
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
8474a997b0
feat: support prism language alias (#1031) 2019-05-22 21:54:31 +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
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
ad5ddbf994
fix: GFM example 558 (#917) 2019-04-12 22:46:45 +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
26c823d11e fix unecessary cache token (#884) 2019-04-06 09:45:41 +02:00
Ran Luo
a2786b13d2
fix: #857 #854 (#864) 2019-04-04 23:22:04 +08:00
Ran Luo
5d748eb196 support ruby and better raw html display (#849)
* support ruby and better raw html display

* finish ruby render

* add kbd style

* if content is empty string, do not hide tag

* update changelog

* add auto complement to inline html

* opti slit words

* opti tool bar style

* support open inline a tag if it is a external link

* fix: auto complete

* add attribute white list

* add comment

* delete some commented codes
2019-04-03 20:31:34 +02:00
Ran Luo
347a1dfe45 feat: front icon prepare for click menu (#779)
* feat: front icon prepare for click menu

* fix: not cursor pointer on front icon button

* hide arrow and pointer cursor
2019-03-25 00:28:49 +01:00
Ran Luo
e1cfec6e3e
opti: rewrite TOC and remove hard code theme (#778)
* opti: prevent the duplicated header text error

* scroll error in toc

* delay the change event when init muya, so that the change event listener can handle change event.

* opti: style

* almost finished need last check

* style in table

* clear up some unused codes

* clear up theme hard code

* add no search data picture and new Folder new File

* move search and replace to top of editor

* add: no data image when there is no TOC

* update structure

* little bug fix

* update styles

* update un_draw icons

* update style of editor

* add animation when make open folder collapse.

* remove theme props in editor component, deprecated lightColor and darkColor

* add Ulysses Light

* theme: graphite

* update Ulysses blockquote

* update emoji style

* update titleBar height

* change theme color

* Support macOs dark mode

* update style of tooltip in editor

* update styles

* fix: TOC auto expand all

* patch added
2019-03-24 05:09:00 +08:00
Ran Luo
54004025e0 fix: #782 (#789) 2019-03-23 19:55:14 +01:00
Ran Luo
5f2c889e05 fix: #754 (#759)
* fix: #754

* update regexp
2019-03-21 21:26:32 +01:00
Ran Luo
70cea33d78
update: icon path (#771)
* update: icon path

* update icon path
2019-03-19 15:19:16 +08:00
Felix Häusler
2ce05829d7 Fix tests and improve CI (#590)
* Fix tests and improve CI

* Add xvfb to Linux - still problems with Mocha e2e tests

* Disable Webpack Bundle Analyzer for testing

* Use preinstalled yarn application on AppVeyor

* Fix build failure with latest vue version

* Remove "markdown-toc"

* Fix application title unit test

* Hide electron window during unit tests

* Add basic muya unit tests

* Dirty markdown-toc replacement

* Update dependencies

* Update eslint packages and configuration
2018-12-17 10:29:37 +08:00
jocs
2e133e21e0 fix: #546 2018-11-07 20:27:53 +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
Jocs
f43504b2d0 fix: #534 2018-10-31 10:22:26 +08:00
Jocs
ee8743dc66 opti: delete some ununsed codes 2018-10-26 00:31:57 +08:00
jocs
8335598916 fix: escap error in language input 2018-10-24 21:10:50 +08:00
jocs
4825ac53b7 fix: search in markup code block 2018-10-24 20:19:24 +08:00
jocs
d127c3f4cb fix: #517 2018-10-23 23:10:56 +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
Jocs
315cdc6614 update: change log 2018-10-10 14:29:26 +08:00
Jocs
d367fd3ae9 opti: only show front matter option when at the first paragraph 2018-10-07 12:59:16 +08:00
Jocs
94db7a7c7f fix: #399 #476 #490 math render with style miss 2018-10-01 12:37:04 +08:00
Jocs
8b24b1611b update: electron to v3.0.0 2018-09-23 21:25:11 +08:00
Ran Luo
405d04ce19
package and release muya (#413) 2018-07-07 00:10:30 +08:00