Christian Williams
1cc8aca16d
Using invisible space character in slugs
...
Change-Id: I36752f4bea96bad61dedfbbb4fc00422d773227b
2012-05-24 14:47:24 -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
Trevor Parscal
0a32898f3a
Added annotation and attribute tests for transaction constructors
...
Change-Id: I61e5f37b1f866afc4a3b9a18cd6e7e7a08e0958f
2012-05-21 12:21:07 -07:00
Trevor Parscal
c38a552442
Fixed case on mapping to $.toJSON
...
* Also made uses of JSON.stringify use ve.getHash
Change-Id: I05dc0374e05b72c798ae0fd44239e5f8bb45ca52
2012-05-21 12:21:07 -07:00
Rob Moen
272f502693
Modify getAnnotationsFromOffset to account for annotated leaf nodes.
...
Refactor remaining annotation methods
Refactor tests to use correct annotation types
Change-Id: Ia3ce42b3d11296b4d63277e0e2a1997d23236613
2012-05-21 12:02:04 -07:00
Rob Moen
3d5da75782
Merge branch 'master' of ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor into dmrewrite
2012-05-21 11:01:16 -07:00
Gabriel Wicke
7e21b7380a
Merge "Round-trip nowiki"
2012-05-21 17:16:56 +00:00
Gabriel Wicke
bd30e51b38
Merge "Serializer and table round-tripping improvements"
2012-05-21 16:38:20 +00:00
Siebrand
cfac325df5
Merge "Add .gitignore"
2012-05-21 16:25:19 +00:00
Gabriel Wicke
fb7d5418a5
Round-trip nowiki
...
Change-Id: I5f7e6a43f5fdc1708ee710b2a601b20db733452c
2012-05-21 18:06:09 +02:00
Gabriel Wicke
a6610e52c2
Serializer and table round-tripping improvements
...
* added stx: 'html' round-trip information for html tags
* added t_stx: 'row' info for row-wise table wiki syntax, and support for it
in the serializer
* the first table row is implicit in wikitext
* renamed lastToken to prevToken in serializer
* strip first newline in an initial chunkCB
Change-Id: I014b046539d1b674d830551c5fd1b74a67f81993
2012-05-21 14:59:53 +02:00
Gabriel Wicke
e069e7cb1c
Merge "Support table captions and properly delimit the end of table options"
2012-05-21 12:51:58 +00:00
Reedy
2b08cf237b
Add .gitignore
...
Change-Id: I48c8b2939ef7c749a9b0a718f77e58238c01889e
2012-05-21 01:50:53 +01:00
Christian Williams
b7afcff62a
Merge branch 'dmrewrite' of ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor into dmrewrite
2012-05-18 15:20:01 -07:00
Christian Williams
6d15028c68
Making showCursor work again!
...
Change-Id: I97e1570ffba368e570b69085daa2798b8b2725f9
2012-05-18 15:19:31 -07:00
Rob Moen
f19c5917f2
remove hasChildren method as I was using it to debug something on
...
previous commit. change traverseLeafNode test name to follow
ve2 test naming scheme
Change-Id: I8b953e3405f42cd58a80da676ac9b16d64f5e72d
2012-05-18 14:11:23 -07:00
Rob Moen
e4a7a36761
Merge branch 'dmrewrite' of ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor into dmrewrite
2012-05-18 13:48:03 -07:00
Rob Moen
62959bec7a
ported traverseLeafNodes and tests to new dm
...
Change-Id: I98487267d6e3efc9e0c07a02b3d5acc8f8cdb4c6
2012-05-18 13:47:14 -07:00
Inez Korczynski
19a02f3798
Disable objectResizing and inlineTableEditing within execCommand
...
Change-Id: I06406bfd56e01e72b157fd8cb50da8d6173edc25
2012-05-18 11:40:22 -07:00
Inez Korczynski
32c2366dca
Logic for adding 'slugs' before, after and between nodes in certain cases
...
Change-Id: I91a1c58bdb7819503a9eb24221d6a358c804b57e
2012-05-18 11:34:07 -07:00
Gabriel Wicke
54e75b93b7
Support table captions and properly delimit the end of table options
...
Change-Id: I15eb8df19528cfceadfee368370501b30f0e36a0
2012-05-18 10:46:43 +02:00
Gabriel Wicke
c39eb36968
Use outerHTML to serialize unhandled DOM node in serializer
...
Change-Id: I37350712c9450c34025740a8d6de51344739c2b7
2012-05-18 10:03:16 +02:00
Gabriel Wicke
3c6d829708
Fix first bug caught by new roundtrip mode for parserTests
...
Change-Id: Id152fd29606d8ee34ac300945f41e2a5f48f087f
2012-05-18 09:55:22 +02:00
GWicke
5ae2653697
Merge "First pass updating parserTests to verify dom->wikitext serialization."
2012-05-18 07:53:40 +00:00
Subramanya Sastry
9b84e931db
First pass updating parserTests to verify dom->wikitext serialization.
...
- Just a quick first pass updating the parserTests.js script so we can
test DOM -> wikitext serialization (but which in effect really tests
roundtripping).
- There is no output normalization yet which is needed for now since we
are not yet preserving white-space.
Change-Id: Ie52058e0dc3330f852c24fa05641dced19f950e0
2012-05-18 09:51:22 +02:00
Trevor Parscal
4dd9a143ae
Added newFromAttributeChange and newFromAnnotation
...
Change-Id: I1e85ccee3fa1591867fea52359508bfa99bad7df
2012-05-17 15:17:17 -07:00
Trevor Parscal
445006d4a8
Made tests a bit stricter before iterating over annotations
...
Change-Id: I7c7f11395cfb4ad392bad9380119b647c0c1b629
2012-05-17 14:58:01 -07:00