Commit Graph

108 Commits

Author SHA1 Message Date
hoijui 34c2bfcfc5 Allow to generate lower case header references through the config (#1305)
This makes the references consistent/compatible with GitHub,
GitLab, Pandoc and many other tools.

This behavior can be enabled in config.json with:

```
"linkifyHeaderStyle": "gfm"
```

Signed-off-by: hoijui <hoijui.quaero@gmail.com>
2019-10-21 22:17:55 +02:00
Yukai Huang 495b65e3b9
Add defaultUseHardbreak as constants
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2019-10-20 14:30:55 +08:00
Max Wu 232c8bd870 feat: add toolbar buttons for table tools
and hide scrollbar of the toolbar to avoid overlapping the buttons

Signed-off-by: Max Wu <jackymaxj@gmail.com>
2019-10-14 14:14:32 +08:00
Max Wu 02feb973e1 feat: add table tools which extends from @susisu/mte-kernel
port of the code from: https://github.com/susisu/mte-demo/blob/master/src/main.js

Signed-off-by: Max Wu <jackymaxj@gmail.com>
2019-10-14 14:14:32 +08:00
Max Wu df2c0e23b6
Merge pull request #1272 from hackmdio/bugfix/support-empty-spoiler
Support empty spoiler container syntax
2019-09-08 01:10:16 +08:00
Yukai Huang 1a85523ac9
Support empty spoiler container syntax
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2019-09-08 00:44:38 +08:00
Yukai Huang d7854cd02c
Make linter happy
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2019-08-18 21:57:32 +08:00
Yukai Huang ad5be66206
Add status bar icon to toggle linter
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2019-08-18 21:57:32 +08:00
Yukai Huang 968e042b05
Cleanup
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2019-08-18 21:57:32 +08:00
Yukai Huang 31765a9d34
Make message more verbose & tweak style
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2019-08-18 21:57:32 +08:00
Yukai Huang 2852be0980
Tweak gutter styles
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2019-08-18 21:57:32 +08:00
Yukai Huang 6ddf872dec
Initial support for markdownlint
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2019-08-18 21:57:32 +08:00
BoHong Li be527765bd
refactor: fix lint on public/js/lib/syncscroll.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:36 +08:00
BoHong Li cc93ace031
refactor: fix lint on public/js/lib/appState.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:35 +08:00
BoHong Li 88601302c4
refactor: fix lint on public/js/lib/editor/utils.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:35 +08:00
BoHong Li 94703dc8b8
refactor: fix lint on public/js/lib/editor/index.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:33 +08:00
BoHong Li 9f35add97b
refactor: fix lint on public/js/lib/editor/config.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:32 +08:00
Yukai Huang 6f7de25079
Make details element syncscrollable
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2019-08-03 19:20:44 +08:00
Yukai Huang 8d889a6736
Support "spoiler" container syntax
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2019-08-03 14:43:16 +08:00
Chulki Lee 1d7895c869 Add plantuml support
Signed-off-by: Chulki Lee <chulki.lee@gmail.com>
2019-07-31 10:02:07 -07:00
BoHong Li a6036cb70b
refactor: back to use js-standard
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:08 +08:00
BoHong Li b0dee3ee14
refactor: fix lint warning on public/js/lib/common/login.js
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-04-12 18:00:45 +08:00
BoHong Li bf727b5878
refactor: fix lint warning on public/js/lib/editor/utils.js
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-04-12 18:00:25 +08:00
BoHong Li 45ba0c646d
refactor: fix lint warning on public/js/syncscroll.js
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-04-12 18:00:25 +08:00
Claudius Coenen 858a59529e switching to eslint for code checking
most rules degraded to WARN, so we don't go insane. This will
change over time. The aim is to conform to a common style

Signed-off-by: Claudius Coenen <opensource@amenthes.de>
2018-11-14 23:15:36 +01:00
Alexander Wellbrock 97c2330264
Fix some false titles
Signed-off-by: Alexander Wellbrock <a.wellbrock@mailbox.org>
2018-07-08 20:41:46 +02:00
Sheogorath 1c92524c08
Fix broken unicode urls
It wasn't possible to create unicode based URLs in freeurl mode, because
the noteid used for the websocket connection is double escaped. When we
decode it and let socketio-client reencode it, we get the real
shortid/noteid and can find the note in the database and open the
connection.

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-06-26 22:25:36 +02:00
Sheogorath 8fe26988d1
Fix all newly introduced linting issues
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-06-23 21:27:21 +02:00
Sheogorath f65d96c57b
Fix liniting and optimize some functions
First fixed some linting issues. Also optimized some functions to be
undoable with one ctrl+z.

This should also speedup some operations

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-06-23 21:18:15 +02:00
Edgar Zanella Alvarenga a8b664fdb5 Add a toolbar to Codemirror editor
Signed-off-by: Edgar Zanella Alvarenga <e@vaz.io>
2018-06-19 16:03:56 +02:00
Sheogorath ad69c5017b
Removing google drive integration
It's sad but it's not working. For multiple releases this should be
already broken which shows how often it's used.

As there is also a security issue related to that, it's better to
remove the feature completely. Whoever wants to rewrite it, feel free to
go.

This commit removes the Google Drive integration from HackMD's Frontend
editor and this way removes the need to provide any API key and Client
ID in the frontend.

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-05-16 01:34:55 +02:00
Sheogorath 9c77e9d7f0
Allow the usage of the esc-key by codemirror
This change allows all input modes of codemirror to use the information
from an input esc-key and make this way vim and sublime more
functional. To prevent this change from breaking the return from the
fullscreen mode, it catches the esc-key in this case. Hopefully this is
an acceptable solution.

As before the vim-mode is handled different in fulltext-mode as it is
esc-key heavy.

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-02-24 21:14:47 +01:00
Sheogorath a7935a595a
Allow more detailed configuration of upload mime types
Fixes #637

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-01-20 15:16:53 +01:00
Edoardo Odorico 6fc2c39eda Implemented dark theme.
Signed-off-by: Edoardo Odorico <edoubuntu@gmail.com>
2018-01-05 00:15:13 +01:00
Oliver Herrmann 7d0ef1276c
Corrected some grammatical issues
Obviously caught up in a bad translation and didn't particularly make sense for native english speakers.
2017-10-30 11:25:44 +11:00
Wu Cheng-Han 2bdccd3996 Fix home and end keys behavior for windows 2017-09-27 21:27:33 +08:00
Yukai Huang 4839838d0c Manage syncscroll / currentMode in appState 2017-05-07 20:38:22 +08:00
Yukai Huang 0e9afde5fa Move syncsroll under lib 2017-05-07 20:38:22 +08:00
Yukai Huang 68ccee20b3 Extract modeType 2017-05-07 20:37:27 +08:00
Yukai Huang c6c11c54ef Expose internal editor config variable 2017-05-07 20:37:27 +08:00
Yukai Huang db06a51299 Load statusbar template by string-loader 2017-05-07 20:37:26 +08:00
Yukai Huang f5b95c5d36 Move updateStatusBar method into editor class 2017-03-28 17:16:32 +08:00
Yukai Huang df743ab902 Fix listener “this” context 2017-03-28 17:11:20 +08:00
Yukai Huang 46ed658d8b Promisify getStatusBarTemplate method 2017-03-28 15:24:52 +08:00
Yukai Huang b86ecb1342 Extract selection update from updateStatusbar 2017-03-28 11:57:44 +08:00
Yukai Huang 81666a726c Impl multiple codemirror event listener 2017-03-28 11:18:36 +08:00
Wu Cheng-Han 448b006194 Update to generate front-end constants on server startup
To avoid extra webpacking on changing configs and follow the 12 factor app
2017-03-20 01:39:09 +08:00
Yukai Huang cc30d370f7 Fix variable exporting error 2017-03-13 22:00:20 +08:00
Yukai Huang 93e41f3a40 Merge branch 'master' into cm-refactor 2017-03-13 21:32:50 +08:00
Yukai Huang 9b513f619f Use JavaScript standard style 2017-03-09 15:39:42 +08:00
BoHong Li 5bc642d02e Use JavaScript Standard Style (part 2)
Fixed all fail on frontend code.
2017-03-09 02:41:05 +08:00
Yukai Huang 6556c284e5 Extract editor related code
- in public/js/lib/editor/index.js
2017-03-08 21:43:32 +08:00
Yukai Huang 121d84863a Extract UI jquery node 2017-03-07 21:59:18 +08:00
Yukai Huang 4bbe035beb Merge branch 'master' into frontend-next 2017-01-21 12:08:52 +08:00
Yukai Huang 04292240d6 Minor style update 2017-01-14 15:47:13 +08:00
Yukai Huang 2408ff4ba9 Add default value for config 2017-01-13 23:12:17 +08:00
Yukai Huang 0fca629c34 Rename common.js to login.js 2017-01-13 23:06:31 +08:00
Yukai Huang c2a8911b9c Move config variable to lib/config 2017-01-13 22:46:38 +08:00