Commit graph

50 commits

Author SHA1 Message Date
Inez Korczyński 580ed725a7 Created simple debug tool - that compares data between DOM and Model - very useful while working on SurfaceObserver and text insertion stuff.
Change-Id: Id30513fc64a947ab7ef0474882ace750f41624b8
2012-10-10 14:27:25 -07:00
Inez Korczyński 3b8a5ae4d5 Initial import of ve.ce.SufaceObserver
Change-Id: Ifc14a6cc30e46c8ae99c59dcb916795c603329ed
2012-10-04 14:24:12 -07:00
Trevor Parscal daa7e76807 Merge "Add a node type for meta nodes" 2012-09-18 18:15:46 +00:00
Catrope 7b96fbe3d2 Add a node type for meta nodes
This node type represents <meta> or <link> (transparently, based on the
style attribute). I had to make two node types for this and hack the
toData conversion code directly into ve.dm.Converter, because we don't
have native support for node types that can be both inline and block.
(We should add this in the node API rewrite.)

The CE implementation renders a placeholder (with the same styles as an
alien node) right now. I'm not sure how nice that is, but it's better
than rendering raw <meta>/<link> tags.

This whole thing is a total pile of hacks to make VE deal with
<meta>/<link> tags until we have a proper node types API.

Change-Id: Id6783fcfc35a896db088ff424ff9faaabcaff716
2012-09-10 15:35:30 -07:00
Trevor Parscal 818fdd8b52 Added links to annotation set classes for demo
Change-Id: I1584eb22a177871d1f18761cf4ec35d8961b2b91
2012-09-07 15:26:24 -07:00
Trevor Parscal b370bbd0bc Improved icons
* Moved icons into Illustrator (used to be in Photoshop)
* Added SVG icons too
* Added support for devices with pixel ratio > 1 (they use SVG)
* Cleaned up icons (little rendering errors here and there)
* Organized icons into their own folder
* Increased the horizontal margin of the down arrows in the formatting (in the toolbar) and location (in the link inspector) drop down menus

Change-Id: I29b7084c9b1145051b2a76f514cfca9826d53ddb
2012-08-31 13:23:04 -07:00
Inez Korczynski 29aef1dec8 Very simple (and a little bit messy) debug tool that dumps not HTML table linear model, view tree and model tree.
Change-Id: I625047fbb99c0d63e1ac6865b7e9cddf4ab72a2e
2012-08-23 15:07:32 -07:00
Inez Korczynski 844df5c8e6 Support for <center> tag
Change-Id: I0d64561dd82b8377ee7491103e81569eaca22fee
2012-08-22 12:51:33 -07:00
Rob Moen dda2c932bd Added MW page suggestion functionality.
Created jQuery plugin MultiSuggest which builds a categorized dropdown
under specified input box.

Revised inspector to no longer be an iframe but to contain an Iframe.
This reduces xbrowser issues with positioning and toggling inspector
container.

Added Inspector overlay element for positioning arbitrary elements
over the iFrame.  This prevents growing the iframe to arbitrary lenghts.

Change-Id: I8efbbd091b0b24a19a4b73aa122d21a329cf97e4
2012-08-17 14:12:26 -07:00
Trevor Parscal d147504f49 Added support for apex skin
* Made vector specific styles only active in the vector skin
* Added apex specific styles
* Removed override of text size for document node
* Added stylesheet for stand-alone to specify text size for document node

Change-Id: I8a57918912499f9453a5692ff45a04a16ed34cde
2012-08-15 16:35:52 -07:00
Trevor Parscal 5752b3fb72 Merge "Add ve.dm.BreakNode to represent <br>" 2012-08-09 21:50:41 +00:00
Catrope 625161e35c Add ve.dm.BreakNode to represent <br>
Change-Id: I3825199c3c8cbe3b50c01e03f39f20cef7c55a28
2012-08-09 14:50:25 -07:00
Trevor Parscal d8ee3c2c29 After much research on error objects, native = good, custom = bad
Stack traces, line numbers, etc. All the approaches I've seen are bad hacks. This is the best way to go.

Change-Id: Ib12e9d2ecfe610bcc89d046005e35cc13efa3d99
2012-08-08 10:48:53 -07:00
Trevor Parscal b4de3ead08 Throw ve.Error instead of string literals
Throwing strings is bad because it doesn't include a lot of important
information that an error object does, such as a stack trace or where
the error was actually thrown from.

ve.Error inherits directly from Error. In the future we may create
more specific subclasses and/or do custom stuff.

Some interesting reading on the subject:
* http://www.devthought.com/2011/12/22/a-string-is-not-an-error/

Change-Id: Ib7c568a1dcb98abac44c6c146e84dde5315b2826
2012-08-08 06:19:00 +02:00
Trevor Parscal 53e9258280 Added ve.init.platform with MediaWiki and stand-alone implementations
This should make it much simpler to keep MediaWiki specifics out of VisualEditor, which will in turn make it easier to integrate VisualEditor into another platform.

Change-Id: I073e9737b37c28af889f2457d10b082cefd0d63b
2012-07-27 13:39:19 -07:00
Inez Korczynski 876fd6be36 Added very simple "debug" tool to demo page.
Change-Id: I3df694187089ac4caa2287b55e3a51755cdec2c7
2012-07-24 16:44:06 -07:00
Trevor Parscal 6b34f09df2 Removed some whitespace
And added a license to some files that didn't have it yet

Change-Id: I3a7e60374d1198d369a0475b8f65f7415012a337
2012-07-19 14:25:16 -07:00
Catrope 8ff9df6023 Merge "Renamed ve.ce.Document.css to ve.ce.DocumentNode.css to match it's contents" 2012-07-19 01:29:03 +00:00
Trevor Parscal 3afb270567 Renamed ve.ce.Document.css to ve.ce.DocumentNode.css to match it's contents
Change-Id: I3d7504dfda27309f631a5856ffa4aacd13b6edc7
2012-07-18 18:23:11 -07:00
Trevor Parscal 9a0380c67d Removed Special:VisualEditorSandbox and refactored demo
Also renamed ext.visualEditor.editPageInit to
ext.visualEditor.viewPageTarget

Change-Id: I8bdd04b3442067e87bccbc60dd4947aae1c7dfd2
2012-07-18 17:57:50 -07:00
Inez Korczynski 93b834a688 Update JS and CSS references in demo to point to new location - ve instead of ve2
Change-Id: I7d5c7888ec4c0923a42c25cf86799b0d07427acf
2012-06-19 20:53:55 -07:00
Trevor Parscal 44d50c980f Added i18n messages to mw.msg fallback
Change-Id: Ic4b44eb6ab31392fa727f14ec38800fe6b185d44
2012-06-19 13:58: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
Trevor Parscal 17fff0d163 Fixed dependency on mw, now demo works again
Change-Id: I26599e065a521cf08a16f5a65e36960a692421e9
2012-06-11 12:11:07 -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 5969f55550 Delete HTMLConverter and update demo&sandbox
Also update the demo and sandbox for ve.{dm,ce}.TableSectionNode

Change-Id: I5a73a8250d283e8666b93561ce9e9374739936a5
2012-06-08 12:40:43 -07:00
Trevor Parscal e7f03c6d70 More cleanup, removed ObjectAnnotation (they are inline elements now)
Change-Id: I2c53c145eed1a801392c954001de7641f928216c
2012-05-31 17:18:28 -07:00
Trevor Parscal 042ffb4e3b Added foundation for new converter
* Added converters to all relevant node implementations
* Added new annotation objects with their own factory

Change-Id: I9870d6d5eac45083929d74d2e58917d0939ca917
2012-05-31 16:50:16 -07:00
Trevor Parscal ea9191b5b4 Copied CSS styles from ve to ve2
Change-Id: Iabd5ee3edde5747952c4b78ef6e9cd5949016050
2012-05-24 15:15:29 -07:00
Inez Korczynski e7cd9e5ef7 Add missing JS files references to demo
Change-Id: I6f85942622b151932d10ab322e5d1ba8b4fbcee3
2012-05-24 11:38:07 -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
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 08765feab3 Merged ve.dm.DocumentFragment and ve.dm.Document
* Also fixed lots of whitespace issues and some global variable introductions

Change-Id: Ia6c82ef0c3b5c4938cf72afa86da6d79e4cb385a
2012-05-17 11:23:56 -07:00
Inez Korczynski 156e15c66b Added missing reference to ve.Document.js
Change-Id: I893442dcb1518c4c05e29fe29aece82ac04fe5c8
2012-05-09 22:51:46 -07:00
Christian Williams 28eb0c82e5 Adding HTML DOM -> Linear Model converter
Change-Id: Iae109d75e64321a7fe4ee8492d79ef5481716246
2012-05-04 15:47:41 -07:00
Rob Moen d42e738636 - Optimize surface model and write unit tests
Change-Id: I8de24c840c5aa2d4232e6e2cc5f72cbd30be96b4
2012-05-04 15:29:47 -07:00
Trevor Parscal 9887dbd96f Split Broke DefinitionListNode out of ListNode and DefinitionListItemNode out of ListItemNode
* Makes it simpler in the linear model because we don't have to use style: "item" for regular list items and style: "definition" for definition lists
* Enforces correct nesting through existing node rules systems
* Updates tests accordingly

Change-Id: I64d80af938e325f1961226505bdc386bb35ccdda
2012-05-04 11:56:32 -07:00
Rob Moen 014084fc65 - fix demo styling for docs list
Change-Id: I5e5d16fe9a002e3cafd01138ad9b92ff987178d6
2012-05-03 16:27:28 -07:00
Trevor Parscal 23e32af302 Added some styles to the demo to add spacing around stuff in the header
Change-Id: Id2e205e9a02dd9b040a40fa4f5ca14891e21d838
2012-05-03 15:21:03 -07:00
Trevor Parscal 4e8a9d75ea Added charset meta tag to demo
Change-Id: I544bdc446262f03bd15790a9cf6d7f9c2f9dcd55
2012-05-03 15:11:10 -07:00
Rob Moen 56dff6dacb Added new node types
Change-Id: I6b5f2e5a7dbdb7c59b4799d44f7924c5594c0e34
2012-05-03 14:22:09 -07:00
Inez Korczynski 6224c60075 Rendering works in very basic version
Change-Id: I8789860fe82f2e7db1e503889e20ce51de57bfa2
2012-05-03 14:02:35 -07:00
Christian Williams 07ca8787bb Including ve.NodeFactory.js
Change-Id: Iac47ea5486c5c631084d2f0d184ab8c84dfd6696
2012-05-03 13:40:16 -07:00
Christian Williams 4f487bf243 Updates to script includes in demo index.
Change-Id: I7c8859461c06ebce0d79633d52108d5a2714118a
2012-05-03 13:35:16 -07:00
Rob Moen 94479bd79d Build out ve.Surface constructor to support multiple editor instances
Now setting up multiple toolbars per config
Tools & Modes are now configurable per toolbar per instance
Base elements are created on demand and no longer id specific
Note: There are some bugs with multiple instances.

Change-Id: Id0bbbca2d1b76fd2db3f3b0f9abd90194930b610
2012-04-26 11:56:47 -07:00
Trevor Parscal 50f43c89d5 Add links in sandbox and demo to ve.dm.DocumentSychronizer.js
This was caused by added this dependency in the code without adding the links to the sandbox and demo

Change-Id: I7b2f0129a28dfd8655dfbce8688cfb3920c690fd
2012-04-02 13:28:09 -07:00
Trevor Parscal 19f3d5c107 Added ve.Surface, a wrapper around an editor instance
* This high level surface object is responsible for creating & managing editor instances
* Revised Sandbox demo to invoke in this way.

Change-Id: I4043779af9a2ab964deaf26079a992e82ebeef27
2012-03-29 15:55:33 -07:00
Trevor Parscal c44ef066b9 Replaced es with ce for Sandbox and main demo
* Configured VisualEditorSandbox to use es
* Reconfigured the ce demo to share the sandbox module
* Removed es demo
* Renamed ce demo to ve (es is broken anyways)

Patchset 2: squashed in https://gerrit.wikimedia.org/r/3953

Change-Id: If8d13bf7011616d222be78899b23186859d5ed70
2012-03-29 15:43:59 -07:00
Renamed from demos/ce/index.php (Browse further)