Commit Graph

306 Commits (0d0934add7d83d7b1eac6ca5f92c9b985eee58c9)

Author SHA1 Message Date
Matthew Hodgson 0d0934add7
unbreak modifier+space (e.g. emoji insert on macOS)
(cherry picked from commit c490f87)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-09 19:58:04 +01:00
Matthew Hodgson 021409aafe
apply review feedback from @lukebarnard1
(cherry picked from commit 37d4bce)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-09 19:54:57 +01:00
Michael Telatynski 5b74c615ae
add missing import
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

(cherry picked from commit 47b6099)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-09 19:42:57 +01:00
Michael Telatynski 43204ea177
fix Control-Backspace after select-all
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

(cherry picked from commit 0f32ec0)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-09 19:42:10 +01:00
Michael Telatynski faf17f06c6
remove debugger statement
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

(cherry picked from commit b6f7940)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-09 19:40:36 +01:00
Michael Telatynski 483116fb03
add rule to slate-md-serializer: make underlined and removed work for CM
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

(cherry picked from commit b521efd)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-09 19:40:29 +01:00
Michael Telatynski 372fa29ad3
take edge into consideration when moving focus region on arrow keys
fixes: >Pressing right when the caret is immediately left of some entity (pill, emojione emoji, etc..) causes the caret to jump to the left of the next entity (or end of the message if there are no more entities)

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

(cherry picked from commit 0982617)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-09 19:40:20 +01:00
Michael Telatynski c6837af398
import-type Change from slate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

(cherry picked from commit 85ed499)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-09 19:40:00 +01:00
Matthew Hodgson efdc5430d7 merge develop 2018-07-09 17:50:07 +01:00
Michael Telatynski e1ba6949d0
expand composer input focus region and apply cursor:text to it
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-23 16:40:53 +01:00
David Baker a6d9c25b70
Merge pull request #1988 from matrix-org/t3chguy/refactor_slashcommands
refactor, consolidate and improve SlashCommands
2018-06-20 13:56:29 +01:00
David Baker e67dae704a Take replies out of labs! 2018-06-20 09:57:11 +01:00
Michael Telatynski 85ddc0651b
consolidate the two locations commands are defined, as it was a MESS
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-18 19:34:40 +01:00
Luke Barnard bea52eccf8 Remove unused import, constant 2018-06-18 17:40:48 +01:00
David Baker 666d469222
Revert "Fix exception when opening dev tools" 2018-06-14 10:52:39 +01:00
David Baker b81e12e4cc Fix exception when opening dev tools
Apparently draft sometimes gets unhappy when you try to move to the
end of an empty state, so only move to the end if we actually
created a non-empty state.

This will be irrelevant once https://github.com/matrix-org/matrix-react-sdk/pull/1890
is merged, but I have the fix now, and this is probably otherwise
going to annoy me now I'm doing things where devtools is very useful.

Fixes https://github.com/vector-im/riot-web/issues/6436
2018-06-13 16:55:16 +01:00
Matthew Hodgson 6299e188a4 unbreak keyboard shortcuts & ctrl-backspace 2018-05-26 02:11:20 +01:00
Matthew Hodgson ab41212258 fix double-nested code blocks & bump md-serializer 2018-05-26 00:37:21 +01:00
Matthew Hodgson 864a33f978 switch to using 'code' for both blocks & marks to match md-serializer 2018-05-23 20:12:13 +01:00
Matthew Hodgson b0ff61f7ef switch code schema to match slate-md-serializer 2018-05-23 14:12:08 +01:00
Matthew Hodgson fc1c4996fc slate-md-serializer 3.1.0 now escapes correctly 2018-05-23 02:15:34 +01:00
Matthew Hodgson 6fba8311f9 escape blockquotes correctly
and fix NPE
2018-05-23 02:09:37 +01:00
Matthew Hodgson 794a60b9f8 refocus editor immediately after executing commands
and persist selections correctly across blur/focus
2018-05-23 01:36:21 +01:00
Matthew Hodgson e7a4ffaf45 fix emojioneifying autoconverted emoji 2018-05-23 00:52:00 +01:00
Matthew Hodgson cace5e8bfc fix bug where selection breaks after inserting emoji 2018-05-23 00:41:46 +01:00
Matthew Hodgson 11cea61661 refocus editor after clicking on autocompletes 2018-05-21 12:28:08 +01:00
Matthew Hodgson 7de45f8b7b make quoting work 2018-05-21 03:48:59 +01:00
Matthew Hodgson b616fd025e comment out all the tests for now 2018-05-20 23:34:06 +01:00
Matthew Hodgson e460cf35e0 hide formatting bar for MD editor 2018-05-20 22:48:40 +01:00
Matthew Hodgson f981d7b729 unify buttons on the node type names, and make them work 2018-05-20 22:39:40 +01:00
Matthew Hodgson d799b7e424 refactor roundtripping into a single place
and fix isRichTextEnabled to be correctly camelCased everywhere...
2018-05-20 16:30:39 +01:00
Matthew Hodgson aac6866779 switch back to using commonmark for serialising MD when roundtripping
and escape MD correctly when serialising via slate-md-serializer
2018-05-20 14:33:14 +01:00
Matthew Hodgson e9cabf0e85 add pill and emoji serialisation to Md 2018-05-20 03:17:51 +01:00
Matthew Hodgson a0d88a829d support sending inlines from the RTE.
includes a horrific hack for sending emoji until
https://github.com/ianstormtaylor/slate/pull/1854 is merged
or otherwise solved
2018-05-20 02:53:32 +01:00
Matthew Hodgson d76a2aba9b use <p/> as our root node everywhere and fix blank roundtrip bug 2018-05-20 01:07:25 +01:00
Matthew Hodgson c3a6a41e5d support links in RTE 2018-05-20 00:49:29 +01:00
Matthew Hodgson f2116943c8 switch schema to match the MD serializer 2018-05-20 00:17:11 +01:00
Matthew Hodgson 65f0b05719 fix typo 2018-05-19 23:40:22 +01:00
Matthew Hodgson 572a31334f add h4, h5 and h6 2018-05-19 23:34:30 +01:00
Matthew Hodgson 1f05aea884 make HTML pasting work 2018-05-19 23:33:07 +01:00
Matthew Hodgson 1536ab433a make file pasting work again 2018-05-19 22:05:31 +01:00
Matthew Hodgson d426c3474f fix strikethough & code, improve shift-return & backspace 2018-05-19 21:36:22 +01:00
Matthew Hodgson 58670cc3e5 exit list more sanely on backspace 2018-05-19 21:14:39 +01:00
Matthew Hodgson a4d9338cf0 let backspace delete list nodes in RTE 2018-05-19 20:38:07 +01:00
Matthew Hodgson 167742d900 make RTE sending work 2018-05-19 20:28:38 +01:00
Matthew Hodgson 089ac337f4 remove unused html serializer 2018-05-18 15:22:24 +01:00
Matthew Hodgson e51554c626 actually hook up RTE 2018-05-17 02:13:17 +01:00
Matthew Hodgson ae208da805 nudge towards supporting formatting buttons in MD 2018-05-17 00:01:23 +01:00
Matthew Hodgson 4eb6942211 let onChange set originalEditorState 2018-05-15 01:16:06 +01:00
Matthew Hodgson 12a56e8b8e remove spurious comment 2018-05-15 00:59:55 +01:00