Roan Kattouw
bc600b34be
Make prepareWrap() use the data from the model rather than the unwrap
...
parameters. This fixes the case where rolling back a list unwrap would
restore the list items without their attributes
2012-03-09 01:14:41 +00:00
Roan Kattouw
04910777d9
Fix stupid typos so wrapEach actually works
2012-03-09 00:38:34 +00:00
Roan Kattouw
ab26581b2e
Fix cursor adjustment in replace()
2012-03-08 23:21:28 +00:00
Roan Kattouw
5054ed320e
Implement prepareWrap and add tests for it
2012-03-08 23:21:26 +00:00
Roan Kattouw
9b66749575
Add documentation for to-be-written prepareWrap function
2012-03-08 23:21:24 +00:00
Roan Kattouw
d978797fca
Add a very simple transaction builder for content replacements
2012-03-08 23:21:21 +00:00
Roan Kattouw
cac9971299
Implement the replace operation for the linear model
2012-03-08 23:21:20 +00:00
Roan Kattouw
46dbb30b7a
Factor the batched splice code out from ve.insertIntoArray() into a
...
separate function
2012-03-08 23:21:18 +00:00
Roan Kattouw
93deba7b5c
Add replace operation
2012-03-08 23:21:17 +00:00
Trevor Parscal
becb1daa39
Added more tests for ve.dm.DocumentSynchronizer and fixed some bugs along the way
2012-03-08 19:35:51 +00:00
Alexandre Emsenhuber
62e8312535
svn:eol-style native
2012-03-08 12:27:02 +00:00
Trevor Parscal
459c4fa271
Added some basic tests for resize and insert. Fixed some bugs in both of those code paths along the way.
2012-03-08 00:52:30 +00:00
Trevor Parscal
de0f83643b
Typo in file name
2012-03-07 23:48:58 +00:00
christian
df4f017b21
preserve range after applying annotation
2012-03-07 23:35:38 +00:00
Inez Korczynski
ab496f7bc9
Get rid of showCursorAt method. And replace calls to it with calls to showCursor.
2012-03-07 23:33:41 +00:00
Inez Korczynski
8e56acbaca
Added getDOMNodeAndOffset and showSelection methods to Surface. Ohhh and little wrapper around it - showCursor.
2012-03-07 23:32:26 +00:00
christian
76b7127e29
removing usage of rangy anchornode for determining rendering scope - using model and autoRender
2012-03-07 21:41:53 +00:00
Inez Korczynski
73f53e89c6
Small refactoring. Changed method name, from Surface.getSelection to Surface.getSelectionRange.
2012-03-07 21:37:39 +00:00
christian
22ce25dc69
replacing cursor after annotating works
2012-03-07 21:06:07 +00:00
Trevor Parscal
55cf0c8ada
Added sketch for ve.dm.DocumentSynchronizer which is a utility object for queueing up actions to be performed on the model tree such as deletion, insertion, rebuilding, resizing and updating of node. Using this approach, we can collect actions across multiple steps, and then normalize them to avoid duplicate work and mutate the model tree in a single step.
2012-03-07 20:21:32 +00:00
Rob Moen
0520e64d97
port over annotation methods from ES to CE, remove unused renderDomNode method
2012-03-07 19:37:17 +00:00
Rob Moen
73fbbe29ab
cleanup whitespace
2012-03-07 19:33:00 +00:00
christian
816a6717a6
adding autoRender property to SurfaceView to enable/disable automatic rendering of view when model is updated
2012-03-07 08:13:12 +00:00
Trevor Parscal
a82ddeae51
Fixed some jshint complaints and enforced 100char line endings
2012-03-06 23:51:31 +00:00
Inez Korczynski
2e9ab44719
Update class names, from ve.es to ve.cs, and update code that uses those classes
2012-03-06 22:39:43 +00:00
Inez Korczynski
594a0e6d6c
Rename bunch of files from ve.es.* to ve.ce.* (and update references)
2012-03-06 22:35:42 +00:00
Inez Korczynski
8dcd638249
Copy files from ve/es to ve/ce and update references
2012-03-06 22:31:44 +00:00
Rob Moen
809df81282
enable CE demo toolbar, added annnotation and renderDomNode methods
2012-03-05 22:08:35 +00:00
Rob Moen
da5a148f9c
prevent insert for stand alone command key.
2012-03-05 17:57:54 +00:00
Rob Moen
714f15cef7
minor changes: remove whitespace and add semicolons
2012-03-03 00:17:15 +00:00
Inez Korczynski
01e84a558c
Improvements to changes polling mechanism
2012-03-02 02:07:55 +00:00
Inez Korczynski
90cfb62cb6
Added basic support for enter key
2012-03-02 01:35:34 +00:00
christian
923e9380cd
event binding cleanup
2012-03-02 01:12:18 +00:00
christian
3a1ee7e5b9
adding paste fixes to cut handler
2012-03-02 00:37:01 +00:00
Inez Korczynski
b16a1c3899
Fix bug in Chrome when moving cursor with left/right arrow in between <table> and textnode
2012-03-02 00:34:31 +00:00
christian
5ec5fb77e6
better cut-copy-paste support
2012-03-02 00:27:04 +00:00
Inez Korczynski
7de9e98583
Fix couple of poll interval bugs in Surface and add new parameter called 'byref' to method getAnnotationsFromOffset which makes it return array references instead of copy of arrays.
2012-03-02 00:10:08 +00:00
christian
3f1ed0be6d
adding cut-copy-paste
2012-03-01 22:27:23 +00:00
Inez Korczynski
8120b0b624
Cleanup for JSLint
2012-03-01 22:14:14 +00:00
Inez Korczynski
45cd5a11d0
Explicitly pass parameter global=true to getOffset method
2012-03-01 20:52:22 +00:00
Inez Korczynski
5dc284efaf
Added getSelection method to Surface
2012-03-01 20:49:21 +00:00
Inez Korczynski
3bb7f81714
Migreate text input method from playground to ce and ce demo
2012-03-01 01:28:39 +00:00
Sam Reed
fc49422e1d
More image compression of extensions with WMF interest
2012-02-29 22:02:03 +00:00
christian
13fe37193a
re-enabling native browser spellcheck
2012-02-28 23:43:38 +00:00
Rob Moen
f6f05241c7
fixed my typo follow up r112555
2012-02-28 01:37:38 +00:00
Rob Moen
78eedb8c74
cleanup previous commit. follow up r112552
2012-02-28 00:46:23 +00:00
Rob Moen
37ffc61c19
prototype RTL text mode cursor handling. Need to complete the unicode regular expression, and make helper methods for RTL boundary
2012-02-28 00:35:17 +00:00
christian
7053e0517c
prevent dragging and dropping text - can be removed later if operation supported via model
2012-02-27 21:56:56 +00:00
Rob Moen
0575db24f7
added a left positioning to input to properly position ime context menu
2012-02-27 19:44:02 +00:00
Rob Moen
ed35395ba2
fix typo which prevented readInterval from stopping onBlur
2012-02-24 17:41:22 +00:00
Rob Moen
dab0396b54
minor fixes: removed whitespace, added semicolon
2012-02-24 00:49:28 +00:00
Rob Moen
8cf2fe9f33
follow up to r112276, fixed bug which prevented word selection
2012-02-24 00:32:44 +00:00
Trevor Parscal
7baae71363
very minor fixes
2012-02-24 00:05:29 +00:00
Rob Moen
26ab5f7408
Fixed bug when moving cursor with click. Calling showCursor after input regains focus prevents browser from freakishly scrolling
2012-02-24 00:04:21 +00:00
Rob Moen
297d41bb63
Rework general input to no longer clear during IME. Polling interval for non keyDown text comparison. Chunked text insertion for all normal keys which makes nice transactions and clears input.
2012-02-23 23:20:47 +00:00
Trevor Parscal
7366a22046
Added support for respecting new lines in pre-formatted blocks - using Shift+Enter will show this in action!
2012-02-23 01:18:01 +00:00
Trevor Parscal
696f5cb2a0
Replaced "set" and "clear" method for attribute transactions with "replace" method, which allows correct reversion. Also fixed list item tools to correctly use the new function signature.
2012-02-22 21:23:28 +00:00
christian
8b3bc2e439
turning off native spellcheck for now
2012-02-15 23:42:43 +00:00
Trevor Parscal
5f033c9bfe
Changed the way widths are calculated when rendering lines of text. Now we let the browser do it's normal layout thing, and use a set of floated divs to figure out the effective line width. Using this technique, we pretty much support floating content from a rendering perspective. Interaction is still a problem however.
2012-02-14 20:30:40 +00:00
Inez Korczynski
d5ad9a9ad4
New approach to text input and IME (part I)
2012-02-13 22:45:18 +00:00
christian
0e6fe86a05
Commenting out fake cursor for now, fixing paste binding
2012-02-13 19:51:39 +00:00
christian
c532488b40
creating showFakeCursorAt method and cleaning up code
2012-02-13 19:48:05 +00:00
Inez Korczynski
3ee4da941d
Render real <b> and <i> tags insteaf of <span>s
2012-02-13 19:38:31 +00:00
Inez Korczynski
0ce3c67872
Working prototype of insertion of the text with annotations
2012-02-11 01:04:14 +00:00
Inez Korczynski
001a432fa3
Get rid of console.logs
2012-02-10 22:27:17 +00:00
Inez Korczynski
b3453dc71c
Add new method: getDOMText
2012-02-10 22:19:12 +00:00
christian
f0e60248fb
fake cursor demo
2012-02-10 18:18:35 +00:00
Alexandre Emsenhuber
bfa0a28968
svn:eol-style native
2012-02-10 16:57:02 +00:00
Inez Korczynski
acd819b28b
Fix showCursorAt method - missing "break;"
2012-02-10 05:39:28 +00:00
christian
ed7dc80db9
reorginization of event handlers
2012-02-09 22:11:33 +00:00
Brion Vibber
d0abf39168
ve.js isn't the edit surface, that's es.js :)
2012-02-09 22:04:06 +00:00
christian
ffad7ef3d8
removing beforepaste event for now. it was hyper
2012-02-09 08:41:36 +00:00
christian
6a23449ecb
using transact
2012-02-09 07:39:43 +00:00
Inez Korczynski
3f843bb1a6
First implementation of IME for content editable
2012-02-09 00:51:59 +00:00
christian
f84fc1cbf1
paste handler no longer causes fast viewport shift when pasting
2012-02-08 23:37:52 +00:00
christian
13921a0468
layout tweaks
2012-02-08 22:50:34 +00:00
christian
e3e3150399
using execcommand to undo cut - model controls mutation
2012-02-08 18:06:03 +00:00
christian
cdbe9a7d13
fixing scroll after paste
2012-02-08 07:18:15 +00:00
christian
df78da31ca
removing offset override
2012-02-08 06:55:12 +00:00
christian
212d4d7559
adding overflow hidden to allow clicking on floated elements
2012-02-08 06:31:51 +00:00
christian
1dd6d8f2b5
working on getSelection and getOffset for triple click
2012-02-08 06:28:38 +00:00
christian
75bec9fba1
cut support
2012-02-08 02:12:21 +00:00
christian
2d058f7a4d
copy and paste support
2012-02-08 00:47:51 +00:00
Inez Korczynski
746e603184
Implement: surfaceView.showCursorAt(int n)
2012-02-08 00:30:40 +00:00
Inez Korczynski
beda113281
Delete scanBoundaries method from Content, as it does not make sense anymore for content editable approach
2012-02-08 00:26:18 +00:00
Inez Korczynski
2d531ed213
Get getSelection in contenteditable working
2012-02-08 00:02:08 +00:00
Inez Korczynski
a046c0d2cf
Cleanup Surface.js - only functionality that is needed for content editable
2012-02-07 22:59:30 +00:00
Inez Korczynski
db0aea6965
Make paragraphs in content editable use real <p> tags
2012-02-07 22:22:49 +00:00
Inez Korczynski
0ced900973
Added missing CSS and PNG so ce demo does not complain anymore.
2012-02-07 22:03:39 +00:00
Inez Korczynski
e0c10cdfff
Cleanup ve.es.Content.js for ContentEditable and setup toolbar as empty (as there is no working functionality for now)
2012-02-07 22:02:11 +00:00
Alexandre Emsenhuber
f162145298
svn:eol-style native
2012-02-07 19:13:19 +00:00
christian
2a076da93a
removing outline from contenteditable
2012-02-07 02:01:26 +00:00
christian
be552732c0
tweaks to margins
2012-02-07 02:00:08 +00:00
Inez Korczynski
9173608afb
Adapt ContentEditable code to new schema of directories and files
2012-02-07 01:43:49 +00:00
Trevor Parscal
8078b0f8a2
Fixed backspace - another issue related the r110805 (or as we are now calling it, "The Great Code Migration of 2012")
2012-02-07 01:11:32 +00:00
Trevor Parscal
d172b220b7
Minor fixes (line length breaking, jshint nagging, etc)
2012-02-07 00:42:16 +00:00
Trevor Parscal
6dcc39fe11
Migrated es.* to new ve.* namespace which is more structured, and will make it easier to keep data model, edit surface, user interface and content editable work separated cleanly
2012-02-06 23:50:56 +00:00
jenkins-bot
2b352c577c
Merge "(bug 45029) Transactions for metadata modification."
2013-02-15 01:28:44 +00:00
Ed Sanders
67e9d5d1dd
(bug 45029) Transactions for metadata modification.
...
Have created builders for insertion, removal, and single element replacement.
In adding Document.getMetadata which is nearly identical to Document.getData,
the two functions have been refactored to use a common static method
getDataSlice, with this.data/this.metadata as an argument.
Document.spliceMetadata has been added. It is essentially spliceData with
the data/metadata synchronisation issue.
Metadata cursor position is now tracked in the TransactionProcessor. Cursor
advancement has been moved to a function so the metadata cursor can be reset
every time the data cursor is moved.
There were unhit bugs in the TransactionProcessor run test section, where
the data being loaded into the test documents wasn't always being deep-copied,
and the assert was looking at getData instead of getFulldata (which wouldn't
be able to test metadata changes).
Change-Id: Ieb20ab3e7827bc7ff04148f147da6728eb1eb666
2013-02-14 17:27:27 -08:00
jenkins-bot
92e5f94e41
Merge "Add user interface widgets"
2013-02-14 19:04:59 +00:00
jenkins-bot
a1bd1db241
Merge "Use .static.isMeta to communicate meta-ness"
2013-02-14 18:47:48 +00:00
Trevor Parscal
d0ff691f9e
Add user interface widgets
...
* New! Button and InputLabel widgets
* Using new buttons in the demo
* Moved styles around to generalize input styles
Change-Id: Ic42e133f8fe0fffcb61374c09dd5668db82a4799
TODO: Use these buttons other places! (like ve.init)
2013-02-13 18:04:04 -08:00
jenkins-bot
385606d6fe
Merge "Added new icons"
2013-02-14 00:09:53 +00:00
Trevor Parscal
d42a52bb59
Added new icons
...
Icons needed for upcoming generated content editor.
* Parameter (big and small)
* Parameter Set
* Source (big and small)
* Template (big and small)
Change-Id: I9c5df7970e3f0991ac6a66590212f40d83af9c0a
2013-02-13 16:06:29 -08:00
Inez Korczyński
f0bc9935d2
(bug 41199) Fix the problem with placing cursor by clicking next to article content.
...
The specific use case is when user clicks on the left side of the inline alien node which
is at the beginning of the line or on the right side of the inline alien node at the end of
the line. This fix does not cover Monobook.
Change-Id: Ib24b03e30e753850698ed6b10be49b4f2642c92b
2013-02-13 15:36:45 -08:00
jenkins-bot
6b51b0f635
Merge "Annotate newly inserted target text as a link."
2013-02-11 20:00:26 +00:00
jenkins-bot
8d274c19e6
Merge "Implement inline documentation examples."
2013-02-09 01:50:44 +00:00
Timo Tijhof
62aeb254d9
Implement inline documentation examples.
...
Refactored the (previously unused) eg-iframe file to be a
template with 2 placeholders for script and styles.
The previous version was just the basic version to execute
javascript code, but that's not good enough since we need a
whole bunch of classes to be loaded.
A bash file processes the template into proper html, with the
help of the makeStaticLoader maintenance script we already had.
Updated demo.css, cleaned up redundant properties restyled
slightly to be more like the Vector skin and less "raw".
Fixed default $IP path in makeStaticLoader.php to work with simple mediawiki core installs having the extension in the
regular extensions directory, and prefixed __DIR__ so it
doesn't rely on the directory you call it from.
Change-Id: Ic789121dfeca08d9db69564d2ad2e52b3fa45de9
2013-02-08 17:47:10 -08:00
jenkins-bot
5ee7b12119
Merge "ve.dm.DocumentSlice does not extend ve.Node"
2013-02-08 23:22:22 +00:00
Trevor Parscal
9eed973ca5
ve.dm.DocumentSlice does not extend ve.Node
...
Change-Id: I11d28d6eb1c7db1d6b5796ec36c8e9a6f46b7c9e
2013-02-08 14:11:11 -08:00
Catrope
28512c9488
Use .static.isMeta to communicate meta-ness
...
This gets rid of the meta-specific hack in ve.dm.Document
Later on, I want to use this to get rid of meta-specific hacks in the
converter too, by pushing some of that logic into the ModelFactory.
Change-Id: I1dbee1654fa32d9c7cd521ec325b2553cde219d1
2013-02-07 17:17:34 -08:00
Rob Moen
4d3ccb7b99
Annotate newly inserted target text as a link.
...
Fixes (Bug 44086)
Changes:
ve.ui.LinkInspector.js
- Annotate fragment for affected range.
- Fragment returned by insertContent was a zero length range, therefore
no content was being annotated. It is questionable whether insertContent
should return the affected range or not.
- Also changes behavior of editing existing link annotations so that the cursor is after the annotation rather than covering it when the inspector is closed
Change-Id: Ic53b9844f84781cad05ac1f63964c9aaf7de68c3
2013-02-07 16:06:08 -08:00