Inez Korczynski
3ac2c8e494
Improve handling for enter key - and support typing "on the selection" by removing selection first.
2012-06-18 22:25:16 -07:00
Inez Korczynski
4cef63538f
Replace every second space with and do the same for the first space and last space.
2012-06-18 22:24:18 -07:00
Inez Korczynski
5e845979b8
Merge branch 'dmrewrite' of ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor into dmrewrite
2012-06-18 22:23:15 -07:00
Trevor Parscal
ca4f19c726
Fixed remaining uses of transact to change
...
Change-Id: I63c8fb183be8b37db85ed386d7bf33633e821f80
2012-06-18 22:05:05 -07:00
Inez Korczynski
f97ef02370
Early version of support for typing in "slug" (turning it into paragraph)
2012-06-18 15:50:20 -07:00
Inez Korczynski
6276938d21
Fix problem with turning elements of one type into elements of another type.
2012-06-18 15:30:23 -07:00
Inez Korczynski
6d5e524817
Cleanup in ve.ce.Surface - no significant changes
2012-06-18 15:11:54 -07:00
Trevor Parscal
11a3d883f2
Using resource loader debug scripts to unstub ve.log
...
Also added ve.dir and converted use of console.log to ve.log
Change-Id: Ibbfd78b6ece163f54f40e997c79a01de6609c2b4
2012-06-18 13:30:39 -07:00
Inez Korczynski
1fa1908402
Merge branch 'dmrewrite' of ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor into dmrewrite
2012-06-18 13:19:24 -07:00
Inez Korczynski
8b823a7dc6
Introduce new method in Surface model called "change" and get rid of "setSelection" and "transact". Start using new method in Surface view - which right away fixes two bugs - typing at the and of the document, and typing in newly created paragraph/heading.
2012-06-18 13:19:07 -07:00
Trevor Parscal
debef5671c
Made the first paragraph in a list item have no margins or padding to simulate raw text
...
Change-Id: I7e0aeb9a15db4a56f2a3552430c0da0202f97a97
2012-06-18 13:12:47 -07:00
Christian Williams
3885eb766d
Using empty pseudo selector and blank image dataURI to battle IE's ridiculous hasLayout bug.
...
Change-Id: I2acec8ff4d7444726b94c46fc53c0085457c959e
2012-06-15 15:14:13 -07:00
Christian Williams
8805cebc6e
Start/stop poll handling for cut and paste
...
Change-Id: I8a9dcad6f320bdc90b79bfeaad10622543483ffa
2012-06-15 11:47:05 -07:00
Rob Moen
d1eba674b1
Write a better debounced onSelect method for showing the context
...
view icon after select events are finished being fired.
Change-Id: I4e1307b90eed14b1c9167830018e50b9c7832ae6
2012-06-15 10:46:45 -07:00
Catrope
a4589106ec
Add a TODO note about preventDefault in alien nodes
...
Change-Id: I9aa0c6bec1587bdc65f1585c9ea3562c6d2153e6
2012-06-14 23:57:40 -07:00
Catrope
be05c9d7ef
Add a TODO to the image code about width&height
...
Change-Id: I75569c1191a7846567e4a4af2dbcd45449cb729c
2012-06-14 23:54:30 -07:00
Catrope
aefd6a9792
Fix domWrapperElementType entries in ce that were out of sync with dm
...
Change-Id: I2684af71af803bc4b57e43a48986bdfced383193
2012-06-14 23:54:06 -07:00
Rob Moen
6b8d8d24aa
Clear state of contextview when there is no selection length.
...
Make context update method work on single call
Change-Id: I2b7f3a31ea5ca1530f927a7e11827d583f134ffb
2012-06-14 21:13:59 -07:00
Rob Moen
b31a25c12c
Fix context icon update method
...
Change-Id: I1100e53a0bf4364d6435f648b06ce0be7851e8db
2012-06-14 21:06:16 -07:00
Catrope
7f97520af2
Don't produce an invalid range
...
I know this code is still being worked on but I felt like I should put
this in anyway, it might save the person working on it some work
Change-Id: I1535399b3798cd8de2fc5334cd1eac64b71e8821
2012-06-14 19:34:30 -07:00
Catrope
ef0c551b79
When deleting, collapse the selection before issuing a transaction
...
This is needed because there are onTransact event handlers that use the
selection and expect it to be up-to-date. The previous behavior caused a
bug when pressing backspace at the end of the document, because the old
selection (at the end) was invalid in the context of the updated
document.
Change-Id: I159e37894d14d437f46495604c14804c0a13e84e
2012-06-14 19:33:13 -07:00
Catrope
c0b3de327f
Don't add empty annotation objects when inserting text
...
Empty annotation objects are unexpected by the rest of the data model
and cause weird breakage in the converter, resulting in inserted text
being in its own paragraph
Change-Id: I63de37c3c5e19ac650e7c7f2d1a0bfab21d45da9
2012-06-14 19:24:44 -07:00
Inez Korczynski
fc138f3497
Start polling in async mode after document node is focused
2012-06-14 17:24:15 -07:00
Inez Korczynski
9f1885bc4b
Typo. Sorry )-:
2012-06-14 17:21:50 -07:00
Inez Korczynski
063cad43b9
Cleanup to startPolling, stopPolling and clearPollData
2012-06-14 17:20:41 -07:00
Christian Williams
87823835ad
Starting and stopping polling for Enter
...
Change-Id: I398b6df242009f105bdb2214120779e6c5e57856
2012-06-14 17:21:05 -07:00
Inez Korczynski
e9d02b56a2
Little bit of a cleanup to stopPolling, startPolling and clearPollData
2012-06-14 17:19:05 -07:00
Christian Williams
4ea6d7e7b9
fixing timer var name
...
Change-Id: Ica8d20942908f6a5fb78206873c4036e4ac7d77b
2012-06-14 17:03:25 -07:00
Inez Korczynski
50999cb8ad
Attach handlers to mousedown, mouseup and keydown events on document node focus and disattach on document node blur.
2012-06-14 16:41:03 -07:00
Inez Korczynski
7ab079bc52
Add ve.log, ve.debug and change rendering animation debug effect used in TextNode.
2012-06-14 15:00:29 -07:00
Inez Korczynski
260d3c0413
Fix bug with losing selection direction.
2012-06-14 14:33:33 -07:00
Rob Moen
1e45a06185
Debounced contextView icon on selection in surfaceView.
...
Squashed old list button methods, list & unlist.
Change-Id: Ic522c761636b2126990ee194b7a441e8bf0396aa
2012-06-14 14:27:01 -07:00
Christian Williams
86d891605d
Most of backspace and delete support, methods for starting and stopping polling.
...
Change-Id: Ic387d9eed3a1368dd70c7a86c7b9761400c76f93
2012-06-14 12:17:42 -07:00
Inez Korczynski
9d487c1824
Special handling in pollChanges loop for case when node is null.
2012-06-13 22:23:59 -07:00
Inez Korczynski
3667c2cf83
Block triple click (select node) - temporary - as long as we don't have robust support for it.
2012-06-13 22:19:10 -07:00
Inez Korczynski
c3cf5617fd
Use ve.ce.getDomText and ve.ce.getDomHash instead of ve.ce.Surface.getDOMText and ve.ce.Surface.getDOMHash.
2012-06-13 22:05:38 -07:00
Inez Korczynski
ba680afcc3
Fix bugs in getDomText method.
2012-06-13 22:04:52 -07:00
Inez Korczynski
f4a4952d18
OMG. We have typing, autocorrect and spellcheck working. (Still no IME and still may break cut/paste)
2012-06-13 21:46:29 -07:00
Trevor Parscal
169b7e754d
Cleaned up toolbar annotation updates
...
Change-Id: I8cefd6c871ed6d1ad71f64eb66236de1b8b719b5
2012-06-13 14:31:46 -07:00
Rob Moen
75e9b2cb2d
On transact, redraw selection
...
Change-Id: Ia2f82dd1516113a3c6e77377fec19047fcbd32d0
2012-06-12 13:27:23 -07:00
Trevor Parscal
722c30466d
Got rid of wrapping whitespace (like \n and \t) in a span that made text white
...
This was causing some issues when you started typing there, and it's not clear that the white text is really the best way to go anyways
Change-Id: I8a9d6571ea204603729e96b7ff77184279a31a95
2012-06-12 10:40:44 -07:00
Christian Williams
05ee4e7dac
Binding to 'before paste' for IE only
...
Change-Id: I3e3125d2faf75ea79e7f4c4d86fa1ccd666074b6
2012-06-12 10:23:58 -07:00
Christian Williams
1e4c52237c
Enter key handling
...
Change-Id: I1b5f901a542328c3ae7c19a5cd816112dcac4042
2012-06-11 19:40:09 -07:00
Catrope
44af6bdb18
Factor out redundant getNodeFromOffset() call
...
Change-Id: Ie01282447fab589466554f7c637515289cf570af
2012-06-11 18:10:09 -07:00
Trevor Parscal
59f9bdf22f
Made use of ve.proxy instead of surface having it's own implementation
...
Other cleanup as well
Change-Id: I5de5c048e341dd3dc3ef222ae5686c49e51a32a5
2012-06-11 16:11:49 -07:00
Trevor Parscal
21ff108c28
Bring link converter in line with Parsoid
...
Parsoid outputs rel="mw:wikiLink" or rel="mw:extLink", so we convert that to link/wikiLink and wiki/extLink respectively.
Also preserve the data-mw attribute; we probably need to do this more generally but this'll do for now.
Change-Id: I32e570bffa5a73a733a120d52cfd8b75d3191e02
2012-06-11 00:36:20 -07:00
Trevor Parscal
c40dd953ca
Remove stray debugger statement
...
Change-Id: Ie7c37e658d6d6bc15d5d7c24b2f5cd13945c5243
2012-06-11 00:33:13 -07:00
Trevor Parscal
2e1b304a48
Cleaned up styles for editor in both demo and sandbox/integration
...
Change-Id: I9b4a3727fd04b3c3ff3f297c6656db2592856173
2012-06-08 16:20:37 -07:00
Trevor Parscal
89b2260bfc
Revert "Support for basic text insertion - typing"
...
This reverts commit 21056ff5ec
.
Change-Id: I86bb28d868b2c931f4b6e18ba5023a8a75b40231
2012-06-08 15:54:05 -07:00
Inez Korczynski
21056ff5ec
Support for basic text insertion - typing
2012-06-08 15:31:29 -07:00