Commit Graph

156 Commits

Author SHA1 Message Date
David Wheatley
1738957af7 feat: make markdown toolbar extensible (#33) 2021-12-30 22:02:25 +01:00
flarum-bot
e70bcdb8df Bundled output for commit ac83e9b667
Includes transpiled JS/TS.

[skip ci]
2021-12-29 20:43:48 +00:00
David Wheatley
ac83e9b667 fix: re-use of texteditor with markdown ext breaks markdown toolbar items (#34)
* fix: re-use of texteditor with markdown ext breaks markdown toolbar items

* code review
2021-12-29 20:41:19 +00:00
David Wheatley
05af2ddf39 chore: ignore composer lockfile 2021-12-29 13:44:43 +01:00
David Wheatley
8070247433 chore: add TS config 2021-12-29 13:44:24 +01:00
flarum-bot
6155046330 Bundled output for commit ad41c1f270
Includes transpiled JS/TS.

[skip ci]
2021-12-29 12:20:04 +00:00
David Wheatley
ad41c1f270 ci: add Prettier formatting check 2021-12-29 13:17:12 +01:00
David Wheatley
81b27ede28 feat: add prettier formatting 2021-12-29 13:17:02 +01:00
David Wheatley
252cd8455b chore: switch to Yarn 2021-12-29 13:11:42 +01:00
David Wheatley
28e636b5b0 chore: fully remove mdarea references; bump dependencies 2021-12-29 13:05:04 +01:00
flarum-bot
d840205161 Bundled output for commit 1adb9ca553
Includes transpiled JS/TS.

[skip ci]
2021-10-25 17:59:41 +00:00
David Wheatley
1adb9ca553 Revert "feat: encapsulate markdown buttons in itemlist"
This reverts commit d4aecfc9e3.
2021-10-25 19:58:28 +02:00
flarum-bot
11f5958dae Bundled output for commit d4aecfc9e3
Includes transpiled JS/TS.

[skip ci]
2021-10-25 17:57:50 +00:00
David Wheatley
d4aecfc9e3 feat: encapsulate markdown buttons in itemlist 2021-10-25 19:56:35 +02:00
David Wheatley
7b4234ee71 chore: bump bundled extension constraint to core 1.1 2021-10-13 08:05:47 +01:00
Alexander Skvortsov
162784f611 Release v1.1.0 2021-10-11 21:12:06 -04:00
flarum-bot
48b29b90db Bundled output for commit 8111b5a56c
Includes transpiled JS/TS.

[skip ci]
2021-09-20 22:07:46 +00:00
David Sevilla Martin
8111b5a56c Prevent browser/system shortcuts from triggering when applying editor style from shortcut (#32) 2021-09-20 18:06:47 -04:00
flarum-bot
153138c770 Bundled output for commit e376358e64
Includes transpiled JS/TS.

[skip ci]
2021-09-20 14:20:01 +00:00
Hasan Özbey
e376358e64 Add spoiler and strikethrough buttons (#30)
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
2021-09-20 10:18:48 -04:00
Daniel Klabbers
6c07082c83 changelog for v1.0.1 2021-06-02 09:13:30 +02:00
flarum-bot
4ad2bfc172 Bundled output for commit fd3300d7e5
Includes transpiled JS/TS.

[skip ci]
2021-05-31 13:28:37 +00:00
David Wheatley
fd3300d7e5 Add missing link button to Markdown toolbar (#29) 2021-05-31 14:26:44 +01:00
Daniel Klabbers
14e4a24514 fix branch alias 2021-05-25 22:50:52 +02:00
Daniel Klabbers
1c2e96f30b changes for stable 2021-05-25 16:17:35 +02:00
flarum-bot
5ccac5d607 Bundled output for commit 7f37e36241
Includes transpiled JS/TS.

[skip ci]
2021-05-18 05:20:53 +00:00
Alexander Skvortsov
7f37e36241 Avoid submitting forms with MarkdownButton
Add type="button" to the component so that it won't submit if placed inside a form.

Fixes https://github.com/flarum/core/issues/2875
2021-05-18 01:19:52 -04:00
flarum-bot
f9d97b60d5 Bundled output for commit f076329636
Includes transpiled JS/TS.

[skip ci]
2021-05-17 13:44:50 +00:00
David Wheatley
f076329636 Fix tooltip deprecation warning 2021-05-17 14:43:35 +01:00
David Wheatley
c9af88e721 Use namespaced JS imports 2021-05-17 14:43:21 +01:00
David Wheatley
43b6e0818b npm audit fix 2021-05-17 14:33:53 +01:00
Alexander Skvortsov
58b322fc54 Bump composer reqs for 1.0.0 2021-05-16 18:28:28 -04:00
David Wheatley
f5898b393e Update copyright year 2021-05-15 00:56:00 +01:00
Alexander Skvortsov
0c0b3b2678 Fix display 2021-05-12 20:28:40 -04:00
flarum-bot
be62a33d23 Bundled output for commit 7ea9db7426 [skip ci] 2021-05-10 21:36:25 +00:00
Alexander Skvortsov
7ea9db7426 Editor Consolidation (#28)
- Move insertText to core
- Move styles and apply to core
- Simplify shortcut and button system
- Drop mdarea for now. In the future, we could implement the features we use (list continue, indent) in core.
- Remove admin dist (only admin setting was mdarea)
- Move inline style to css
2021-05-10 17:35:22 -04:00
Alexander Skvortsov
4ec8b87cdc Update changelog for v0.1.0-beta.16.1 2021-03-25 13:54:43 -04:00
flarum-bot
2c8f88a72b Bundled output for commit 61e61f5e8c [skip ci] 2021-03-25 17:52:17 +00:00
Alexander Skvortsov
61e61f5e8c Allow disabling mdarea via admin setting (#27) 2021-03-25 13:51:21 -04:00
Daniel Klabbers
2ea6204dff Release v0.1.0-beta.16 2021-03-15 12:00:06 +01:00
flarum-bot
32bd64f427 Bundled output for commit ae6a652a72 [skip ci] 2021-03-11 18:12:58 +00:00
Alexander Skvortsov
ae6a652a72 Fix typo 2021-03-11 13:11:56 -05:00
flarum-bot
c1308f395f Bundled output for commit 752c43376e [skip ci] 2021-03-11 00:24:16 +00:00
Alexander Skvortsov
752c43376e Run oninput and input listeners on timeout
This is necessary for the setTimeout callback to be run after the new value has been applied; otherwise, mobile iOS doesn't respect the timeout.

Fixes https://github.com/flarum/core/issues/2681
2021-03-10 19:23:27 -05:00
flarum-bot
3f7fb66502 Bundled output for commit 50da5ffd45 [skip ci] 2021-03-08 21:10:12 +00:00
Alexander Skvortsov
50da5ffd45 Handle editor-driven input events.
The mdarea extension's handleKey method only applies when input is accompanied by an actual key press, and won't register programmatic inputs via `app.composer.editor` methods. We add an additional listener for custom events, which are dispatched in `setValue`.
2021-03-08 16:09:18 -05:00
Charlie
6cbd641ad5 Change category (#25) 2021-03-08 14:21:37 -05:00
flarum-bot
cacb6ffd0b Bundled output for commit 09b14b980a [skip ci] 2021-02-27 21:06:27 +00:00
Alexander Skvortsov
09b14b980a Attach oninput, inputListeners, onsubmit via mdarea extension
Recent versions of mdarea are quite powerful, and have internal state data structures. As a result, updating current editor value via `oninput` event listeners isn't reliable. Instead, we can use the mdarea extension API to handle keypresses exactly when markdownarea wants us to.

This also removes the `super` call from `build`, and directly creates/configures the applicable DOM elements. Since the mdarea editor driver's initialization is already quite different from BasicEditorDriver, it should fully own this step.
2021-02-27 16:05:25 -05:00
Alexander Skvortsov
aa62e69dab MarkdownEditorDriver should be its own driver.
Splitting it out instead of hacking it onto BasicEditorDriver gives us more flexibility in customizing it for markdown area.
2021-02-27 15:37:19 -05:00