Inez Korczynski
8a52b41076
Working (but dirty) implementation of getOffset, getDOMNodeAndOffset and handlers for keydown/mousedown - to be refactored very soon
...
Change-Id: I57923218fc8e5f3e1cdde339cdc1cb5e859cdedf
2012-05-25 23:52:52 -07:00
Inez Korczynski
e5897dffa4
Merge branch 'dmrewrite' of ssh://review/mediawiki/extensions/VisualEditor into dmrewrite
2012-05-25 23:36:54 -07:00
Inez Korczynski
e9230968fe
Set contenteditable=false for Alien wrappers (both inline and block)
...
Change-Id: I5fd8fcfd0b6d98b525a75b3818cc77e3aca833c9
2012-05-25 23:36:18 -07:00
Rob Moen
7d9e2d62a3
Restrict ext.visualEditor.core to the VisualEditor namespace in the hook
...
Change-Id: I169052bd9a1a38ab0352cca4bf8006a66db381f0
2012-05-25 16:34:25 -07:00
Christian Williams
8db39d0bb5
Support for plain text paste
...
Change-Id: I60846900d61b50138fe06dacee4693166e59651e
2012-05-25 16:26:46 -07:00
Rob Moen
0227de8c8e
Remove edit token Ajax api request, get edit token from wgUser on save
...
Change-Id: Idb51da271d3eca61230d9948fc82190383fc7143
2012-05-25 16:20:48 -07:00
Christian Williams
64b9b33eec
IE and its silly events
...
Change-Id: I81f46eca20cc5197305cbd355751c4c90e3b670b
2012-05-25 16:12:58 -07:00
Christian Williams
83e7eddfaf
Support for paste
...
Change-Id: Id0a3d5d421aef56eb3296a56d00686ef7d07b433
2012-05-25 15:46:58 -07:00
Rob Moen
4ca26f1805
Switch tabs from read to edit when loading editor.
...
On cleanup, switch tabs back
Change-Id: Iefb47536e21cd7763c0d75c976109aeb2cbecf50
2012-05-25 15:41:22 -07:00
Rob Moen
237c0fd21f
Created VE parsoid API save action.
...
Save action
1) posts html to parsoid service in exchange for wikitext
2) saves wikitext
3) returns parsed content.
On save, VE is hidden and page content is replaced.
Demoing save in toolbar, followup commit will redesign save options
Change-Id: Ibfbe52de08e3483e1a33f0740c03f96ec2b7f90a
2012-05-25 15:27:58 -07:00
Inez Korczynski
1e5e14c2c1
Add method hasSlugAtOffset to ve.ce.BranchNode
...
Change-Id: Id107bf890710096bb49111ae3d0d60e3315ecb89
2012-05-25 13:44:12 -07:00
Trevor Parscal
14862a1212
Fixed bug in isStructuralOffset which didn't consider neighboring a non-content leaf to be a structural offset
...
This was caused by the fact that a non-structural leaf can not have children, which makes it appear incompatible as a sibling to an arbitrary structural element (like a paragraph) but since it can not contain content we can check that instead.
Change-Id: Ie3c58b4b43f2aa6921f8f82aa82511e231207854
2012-05-25 13:19:56 -07:00
Rob Moen
7b47af516a
Merge branch 'dmrewrite' of ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor into dmrewrite
2012-05-25 12:52:46 -07:00
Rob Moen
61413c49eb
Create base integration core module
...
Works on VisualEditor Namespace
Created VE api wrapper for parsoid service to roundtrip pages
Change-Id: I3f2967730c1a3ece31b7262a46bef31ea8b38613
2012-05-25 12:50:48 -07:00
Christian Williams
80ed03f2a2
Support for copying
...
Change-Id: Icf4665f9c48896e26cb536af033ca55410af49db
2012-05-25 12:02:56 -07:00
Inez Korczynski
8f4f076340
Added handles for mouse events (down, up, move). Implemented method SurfaceView.getOffset and applied significant fixes to SurfaceView.getDOMNodeAndOffset.
...
Change-Id: I06cbfa9e0e7afc7aaf19d5cda8b91fe93aeb51f8
2012-05-24 20:55:45 -07:00
Inez Korczynski
afe18a685a
Fix methods getNearestStructuralOffset and getNearestContentOffset for case of passing offsets that are already structural or content
...
Change-Id: I23cd2daab9cef181b01131b3b9c6ead5ec47f9f4
2012-05-24 20:53:50 -07:00
Inez Korczynski
b56b6bad6d
Just for purpose of testing add some hardcoded border and cellspacing to all tables
...
Change-Id: I97ff937d7e7d6a91ee3f411d7f77d5e3798ba567
2012-05-24 20:51:31 -07:00
Inez Korczynski
6017050b3f
Add class ve-ce-imageNode to all image nodes, also comment out mousedown event handler
...
Change-Id: I7565d8822bbe0547e731df1859cdde4ac78de6f2
2012-05-24 20:50:36 -07:00
Inez Korczynski
d9bd47d8a6
Make example demo document even more complicated
...
Change-Id: I9e0406fed859c5d848a5ea52a906d24e1671f458
2012-05-24 20:49:29 -07:00
Trevor Parscal
ea9191b5b4
Copied CSS styles from ve to ve2
...
Change-Id: Iabd5ee3edde5747952c4b78ef6e9cd5949016050
2012-05-24 15:15:29 -07:00
Christian Williams
0a3b5df6de
Image nodes are not draggable
...
Change-Id: Ie1080045939af7c9b7ac8c30527ad6057fe7e3f6
2012-05-24 15:10:16 -07:00
Christian Williams
88e25e77f2
Merge branch 'dmrewrite' of ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor into dmrewrite
2012-05-24 14:47:41 -07:00
Christian Williams
1cc8aca16d
Using invisible space character in slugs
...
Change-Id: I36752f4bea96bad61dedfbbb4fc00422d773227b
2012-05-24 14:47:24 -07:00
Trevor Parscal
f6eef19021
Added copying of .data( 'node' ) from old wrappers to new wrappers on wrapper updates
...
Change-Id: Ibd9535bd9ebb712910d963eedc5941f8512aaf8d
2012-05-24 14:01:42 -07:00
Trevor Parscal
c8ccdb9813
Moved ve.ve.BranchNode.canNodeHaveSlug to ve.ce.Node.prototype.canHaveSlug
...
Change-Id: I6d5d9ca5a1c9878acb15e9526feb94986822b491
2012-05-24 14:01:17 -07:00
Trevor Parscal
ebfafac3e2
Added missing documentation to methods in ve.ce.BranchNode
...
Change-Id: If6833e3d639e0455025762987b7f41a43892ca4a
2012-05-24 13:22:57 -07:00
Christian Williams
933ff678a4
Focus can now be set in slugs using showCursor or showSelection.
...
Change-Id: I12ab361a30d277a4752579bf885fd37bc46b32ed
2012-05-24 13:18:30 -07:00
Trevor Parscal
3ce705313e
Replaced static array with real logic inside of ve.ce.BranchNode.canNodeHaveSlug
...
Also added more static config getters and fixed some typos in prototype definitions
Change-Id: Ib9093a625b944e6a4ca4da50c51fb475b5895b8d
2012-05-24 13:12:45 -07:00
Trevor Parscal
e150ba2e54
Moved "is slug gable" functionality to a static method of ve.ce.BranchNode
...
Also optimized some query stuff
Change-Id: I5675258c6e276a1ba410dcf1ee111392140a04eb
2012-05-24 11:58:33 -07:00
Trevor Parscal
c9dddf60da
Made getRelativeOffset return -1 if no valid offset is found in document
...
Change-Id: If4cef5fe800b241c3efe1d27cdf01cd1ceef2248
2012-05-24 11:43:47 -07:00
Trevor Parscal
8d3044bf60
Added more test cases for the unrestricted option of getRelativeStructuralOffset and getNearestStructuralOffset
...
Change-Id: I1ab99f1ed050950b40dd4c34abd81a43a4099a49
2012-05-24 11:43:47 -07:00
Inez Korczynski
e7cd9e5ef7
Add missing JS files references to demo
...
Change-Id: I6f85942622b151932d10ab322e5d1ba8b4fbcee3
2012-05-24 11:38:07 -07:00
Trevor Parscal
1ddaec8acb
Added getRelativeOffset and several wrappers around it
...
Change-Id: Ifd10922366650165bc4c21ea8cfdd2f9b7163432
2012-05-23 17:43:24 -07:00
Inez Korczynski
e86c053045
Define better example/testing article in Sandbox
...
Change-Id: I5df37d7e3477bd49e69f44c4902810bca66734b7
2012-05-23 17:32:22 -07:00
Inez Korczynski
5b52e5320a
Merge branch 'dmrewrite' of ssh://review/mediawiki/extensions/VisualEditor into dmrewrite
2012-05-23 17:22:23 -07:00
Inez Korczynski
fdbf1ac870
Define better example/testing article in Sandbox
...
Change-Id: Id9ce12f8977b94aca98823fdcb86a0840565579d
2012-05-23 17:22:10 -07:00
Trevor Parscal
541d786ced
Added optional "unrestricted" argument to isStructuralOffset
...
Using this argument will only return true if the offset is a place you can add any element to (hence the unrestricted part of it). This is good for testing if a paragraph could potentially be inserted there.
Change-Id: I6cc91da437c52493de03eb687b28966198270fea
2012-05-23 14:56:33 -07:00
Inez Korczynski
fe1482e0c4
Added method proxy to ve.ce.Surface
...
Change-Id: I2373df4c738b49685a897c8e13acebdd7ccb3e00
2012-05-23 13:34:52 -07:00
Inez Korczynski
bea881daca
Refactor mechanism of adding slugs in before and after particular nodes in branch
...
Change-Id: I8b3f4a9b27ff09d569f366c32f96e7e8191487c0
2012-05-23 13:24:49 -07:00
Catrope
cce32103ff
Implement newFromInsertion()
...
Mostly just wraps around fixupInsertion()
Change-Id: I5c9128439b9ed29b112590c0004a749f9b529346
2012-05-23 12:45:28 -07:00
Catrope
3be3f55c91
Rough first stab at ve.dm.fixupInsertion()
...
This code still needs a lot of work, but it seems to work for most
cases. Things that still need to be done:
* Documentation and comments
* Handling of content and text nodes
** Use Trevor's isContent/canContainContent code which I don't have yet
* Preserve attributes when reopening closed elements
* Tests :)
Change-Id: I3bc16c964ef158693490a61ce12beb21e6fe2a9d
2012-05-23 12:45:28 -07:00
Catrope
9a1ec62f0d
Remove pushInsert() and pushRemove()
...
The 'insert' and 'remove' operations weren't implemented in the
transaction processor and were a holdover from the old DM
implementation.
Also migrated the tests, especially those that asserted that consecutive
insert/remove operations were combined (this is no longer the case now
that they are replace operations)
Change-Id: I2379fe92b331c5316f70f4b695397da41581cce9
2012-05-23 12:45:27 -07:00
Christian Williams
32b9ccd0bf
Moving alien node styling to CSS file
...
Change-Id: I21e4593b81669b48cec831236398866f89616f9a
2012-05-23 12:03:28 -07:00
Trevor Parscal
9af03a29b1
Updated demo and fixed HTML converter
...
Removed hard-coding of alien nodes, now aliens are automatically used for anything unknown, and block or inline aliens are selected based on whether the parent element can contain content or not.
Change-Id: I5d2a521ead4f4c96cb44d084a5c160cc20d8048e
2012-05-23 10:15:44 -07:00
Trevor Parscal
86591e5325
Restructured static node rules
...
Change-Id: I7023e1f334694d59767491f1010e7c4c59c0ce54
2012-05-21 17:39:12 -07:00
Rob Moen
0b9411c531
Cleanup Sanxbox.js
...
Change-Id: Id8ba1aacecdbb5d31888e289d23ab03a16346c60
2012-05-21 17:03:57 -07:00
Rob Moen
95e06e96bf
Prepare for MediaWiki integration
...
Create context instance in surface.
Move over getSelectionRect into ce.surface
Cleanup ve.surface contstructor class
Move linmod/html test objects to sandbox.js
Change-Id: I0cf602ef991100bf6128c68750b02a00566911dc
2012-05-21 16:06:30 -07:00
Rob Moen
8286508491
Include jquery.json.js in both demos to fix error
...
Change-Id: Ic5810536317e6de8a23232b602aced877412b1ea
2012-05-21 12:49:14 -07:00
Rob Moen
7bf15b4377
Copy ui modules to ve2
...
Switch sandbox demo to use new ui modules
Update VisualEditor.php to use ve2 modules
SpecialPageSandbox working
Change-Id: I8261d6bf6ceb6ae7b7bfa5f61aec6a0121906765
2012-05-21 12:39:36 -07:00