Commit graph

45 commits

Author SHA1 Message Date
Luke Barnard
dad797d4a2 Run linting --fix 2017-11-16 13:19:36 +00:00
Luke Barnard
757e42ddca Merge pull request #1458 from pafcu/emoji-fix2
Ignore VS16 char in RTE
2017-10-11 19:49:29 +02:00
Luke Barnard
d3f9a3aeb5 Run eslint --fix
Fixing 1000s of lint issues. Some rules cannot be `--fix`ed but this goes some way to linting the entire codebase.
2017-10-11 17:56:17 +01:00
Stefan Parviainen
8266286e99 Ignore VS16 char in RTE
Signed-off-by: Stefan Parviainen <pafcu@iki.fi>
2017-10-11 08:45:36 +02:00
Luke Barnard
65dc9fda6e Alter comments 2017-08-15 09:25:23 +01:00
Luke Barnard
5f00bbbff6 Add comments 2017-08-15 09:22:50 +01:00
Luke Barnard
844ca249d0 Fix bugs in textOffsetsToSelectionState
This just had some thinkos in it. Namely the conditionals were slightly wrong and this lead to negative offset selection state being returned, causing vector-im/riot-web#4792

fixes vector-im/riot-web#4792
2017-08-14 17:31:16 +01:00
Luke Barnard
a27eefd893 Fix a couple of more errors due to API changes 2017-08-03 15:20:44 +01:00
Luke Barnard
901cbf495d Update decorator strategy API in accordance with recent changes to 0.11.0
See 590cdc6c54, which is a change to the API not mentioned in the migration to v0.10 notes https://draftjs.org/docs/v0-10-api-migration.html
2017-08-03 12:02:29 +01:00
Luke Barnard
fb5dc295aa Reflect API change for getting an Entity 2017-08-03 11:29:26 +01:00
Luke Barnard
124795006c Reflect API change for creating an Entity 2017-08-03 11:18:56 +01:00
Luke Barnard
1512aff326 Add comments 2017-08-02 11:06:02 +01:00
Luke Barnard
2c86086444 Account for \n after each block
when converting from text offsets to selection state.

fixes vector-im/riot-web#4728
2017-08-02 10:51:34 +01:00
Luke Barnard
29b6d70aff Merge branch 'develop' into luke/fix-rte-inline-code-format 2017-07-19 17:19:25 +01:00
Luke Barnard
28c98d93d1 Mimic ctrl+j of RT mode in MD mode
by inspecting whether multiple lines are selected or the selection is empty. If either of these are true, insert a code block surrounding the selection, otherwise insert single backticks around the selection for inline code formatting.
2017-07-19 16:13:47 +01:00
Luke Barnard
31290f3377 Remove redundant, unused decorators from RTE
These have since been replaced by decorators that operator whether in MD mode or otherwise. This might not be optimal because LINK entities do not appear in MD mode at all at the moment, but instead you see the ()[] md notation version.
2017-07-17 14:27:50 +01:00
Luke Barnard
89afcfd897 Linting 2017-06-23 17:35:07 +01:00
Aviral Dasgupta
6004f6d610
rte: fix history 2017-03-10 20:34:31 +05:30
Aviral Dasgupta
feac919c0a
fix rendering of UNDERLINE inline style in RTE 2017-03-07 04:09:27 +05:30
Aviral Dasgupta
ab3b6497f9
Disable "syntax highlighting" in MD mode (RTE) 2017-03-07 04:09:24 +05:30
David Baker
18d4d3392a Fix a bunch of linting errors
eslint --fix and a few manual ones
2017-01-20 14:22:27 +00:00
Aviral Dasgupta
ea1419ff78 force old selection state after creating entities
Fixes vector-im/vector-web#2180
2016-09-21 07:20:50 +05:30
Aviral Dasgupta
39d213429d Disable username and room decorators 2016-09-16 02:47:27 +05:30
Aviral Dasgupta
b62622a814 Improve autocomplete behaviour
Fixes vector-im/vector-web#1761
2016-09-13 15:46:02 +05:30
Aviral Dasgupta
c11232742b Fix focus and toggling issues in formatting bar 2016-09-08 02:46:56 +05:30
Aviral Dasgupta
f0f20beae0 RTE format bar enhancements 2016-09-08 00:03:54 +05:30
Aviral Dasgupta
71251293e4 RTE formatbar (wip)
Fixes vector-im/vector-web#2024
2016-09-08 00:02:16 +05:30
Aviral Dasgupta
8e66e6dfdd fix: Switch to opacity: 0 for composer emoji.
This seems to be the best option for displaying emoji in the composer. While it means selected emoji don't actually have the selection colour applied, it's the most functional of all the options. Facebook uses the same approach.
2016-08-03 18:27:49 +05:30
Aviral Dasgupta
b334522168 feat: code cleanup & emoji replacement in composer 2016-07-08 12:54:28 +05:30
Aviral Dasgupta
30b7efd585 fix: code cleanup, fix getCurrentCommand 2016-07-04 21:44:35 +05:30
Aviral Dasgupta
cccc58b47f feat: implement autocomplete replacement 2016-07-03 22:15:13 +05:30
Aviral Dasgupta
8961c87cf9 feat: Autocomplete selection wraparound 2016-07-03 01:11:34 +05:30
Aviral Dasgupta
fb6eec0f7d Hide/show autocomplete based on selection state 2016-06-21 15:46:20 +05:30
Aviral Dasgupta
56ac1ed0c0 update comment 2016-06-15 20:34:37 +05:30
Aviral Dasgupta
8b8deb86ed Fix RTE escaping, HTML output with breaks 2016-06-15 20:24:37 +05:30
Aviral Dasgupta
ba69e4365d more RTE fixes 2016-06-14 19:28:51 +05:30
Aviral Dasgupta
2606ea9596 fixes and improvements in RichText 2016-06-14 19:10:35 +05:30
Pedro Ferreira
e75a28bb0d Minimal house cleaning 2016-06-12 01:08:31 +02:00
Pedro Ferreira
294a8efdc4 Fix behaviour of modifyText
Since it was not correctly extracting the selected part of the text
string
2016-06-12 01:08:31 +02:00
Pedro Ferreira
a5a3e4e915 Basic Markdown highlighting 2016-06-12 01:07:16 +02:00
Aviral Dasgupta
b960d220d2 cleanup, better comments, markdown hotkeys 2016-06-11 22:24:09 +05:30
Aviral Dasgupta
e4217c3fb7 rte improvements, markdown mode 2016-06-11 15:52:08 +05:30
Aviral Dasgupta
29cdd1fc41 user and room decorators, history & typing notifs 2016-06-09 23:53:09 +05:30
Aviral Dasgupta
fe76eb9f73 minor improvements
- use <p> for unstyled blocks
- fix return key bug
- editor placeholder
2016-05-28 12:02:35 +05:30
Aviral Dasgupta
001011df27 Initial version of rich text editor 2016-05-27 10:15:55 +05:30