Commit graph

6 commits

Author SHA1 Message Date
Ed Sanders cec399b4e3 VE: Disable mw-editfont when using CodeMirror
Due to using bold as a highlight style, the VE overlay technique
will only work with monospaced fonts.

Change-Id: I33e3e07cf0f3d8e25dd35623286eedf28ba20ae1
2017-07-20 21:30:22 +00:00
Ed Sanders 410e442fd1 build: Update eslint, stylelint
Whitespace and regex escaping fixes

Change-Id: Ic706dfd3ed7efb16db104b054091bec0ba0cb5ed
2017-07-20 15:58:31 +00:00
Ed Sanders 16225450c8 VE CodeMirror: Don't handle any specialChars
Bug: T170382
Change-Id: Icf39a5efdc5a553cf5885e4de7189a37a9a7424d
2017-07-12 15:23:49 +01:00
Ed Sanders 91397eb556 Ensure CM surface can't be edited in VE mode
CM surface is just for presentation, it shouldn't
be possible to focus or select anything in the surface,
so in addition to it being beneath the VE surface,
disable it through the CM API and disable pointer-events
with CSS.

Bug: T170170
Change-Id: Ief49c293f514e22bc6db5eebb3a11c1bc695432d
2017-07-10 18:02:22 +00:00
Ed Sanders 6364cb4c04 Rewrite VE<->CM synchronizer using transaction op walking
Previous hacky method fell apart with multi-line transactions.

Depends-On: I465a3f6a8afcd6536293999eb40c01daeb9d905b
Depends-On: I800085eb3a5f7332eab356b62a34bfc603a29839
Change-Id: I66946d7e3f425d8dbbdae720756a7978fbe25582
2017-07-07 23:33:10 +00:00
Ed Sanders 7b01a98ad0 VisualEditor source mode support
Long-term todo:
* Performance will be poor on large pages due
  to using a auto-height textarea which CodeMirror
  doesn't optimise.

Change-Id: I16598fcdbeee51e6fae88376ec81f1c8552b383d
2017-05-08 16:54:10 +01:00