Trevor Parscal
00c555ebe5
Removed attach and detach methods from ve.ce.Node
...
Added some needed functionality in ve.Node to make up for this
Change-Id: Ife902aceb4e8535411dc653ae61087aecf67a0c6
2012-06-20 23:40:38 -07:00
Catrope
df4e5f0200
Merge "Fix minor bug with space replacement in TextNode"
2012-06-21 06:37:56 +00:00
Inez Korczynski
74440be132
Fix minor bug with space replacement in TextNode
...
Change-Id: Iafdc59d9fd8654444079e55a2ad36a40cc21fa4c
2012-06-20 23:33:22 -07:00
Inez Korczynski
ab16987ae8
Better support for left & right arrow keys
...
Change-Id: Iad56f8179d3ed90828e31ad0203a5cec9e9d2458
2012-06-20 23:06:47 -07:00
Trevor Parscal
88ef5b1517
Merge "Logic for moving cursor left and right programmatically"
2012-06-21 05:54:50 +00:00
Trevor Parscal
7e892daac9
Merge "Fixing backspace when at the beginning of the document."
2012-06-21 05:52:45 +00:00
Trevor Parscal
a7b47a2c00
Merge "Pressing enter in the last listItem, if empty, will exit the list"
2012-06-21 05:50:51 +00:00
Inez Korczynski
9b1e96cd46
Logic for moving cursor left and right programmatically
...
Change-Id: I48844cfbebaf3933ad61dc462ab5ea73be45a8aa
2012-06-20 22:24:12 -07:00
Christian Williams
4df69b01de
Fixing backspace when at the beginning of the document.
...
Change-Id: Ib4c463c6a1eb27897a39c96c46617047d8ee4325
2012-06-20 21:34:11 -07:00
Inez Korczynski
7eae9cdba6
Support for insertion in slugs.
...
Change-Id: I8e144206520b59271edf854020b87ce947fe0559
2012-06-20 21:32:26 -07:00
Christian Williams
0ab3b65c03
Pressing enter in the last listItem, if empty, will exit the list
...
Change-Id: I084fabac09654adf50db97b554e937d2772f9a37
2012-06-20 21:10:48 -07:00
Christian Williams
8556888a9a
Fixing handleEnter to allow splitting headlines
...
Change-Id: I4f75ee1b454f66c4b112a1ab59386994bb249792
2012-06-20 20:02:25 -07:00
Trevor Parscal
9c0b8f57b2
Merge "Use getClonedElement() rather than manually building a node"
2012-06-21 02:40:11 +00:00
Inez Korczynski
7291485ce5
Move slugs logic into doSlugs since it is being used in onSplice and in cleanup methods.
...
Change-Id: I10395bbdfd71fda2913e6da736189f0ff8216702
2012-06-20 19:10:28 -07:00
Catrope
ac835c2d69
Merge "Keyboard shortcuts for bold and italic"
2012-06-21 02:09:28 +00:00
Christian Williams
14054becb5
Keyboard shortcuts for bold and italic
...
Change-Id: I12b80134152bbbbd2dfa42b32fec072cde29baa5
2012-06-20 19:09:06 -07:00
Catrope
319ff040bb
Merge "Fix method hasSlugAtOffset to return true when length of the element is 0"
2012-06-21 02:00:51 +00:00
Trevor Parscal
09fd90f66f
Merge "Add slugs inside empty branch nodes so cursor can be correctly placed."
2012-06-21 02:00:17 +00:00
Catrope
7be404f818
Merge "Removed trailing whitespace and other cruft"
2012-06-21 01:59:57 +00:00
Catrope
e8702e8f0f
Use getClonedElement() rather than manually building a node
...
Change-Id: I3d6390830c6a01235e55b1484e161d1f6737ac01
2012-06-20 18:59:12 -07:00
Catrope
7f3106802c
Merge "Modified handleEnter to insert a paragraph above/below a non-paragraph if at the edges"
2012-06-21 01:57:58 +00:00
Trevor Parscal
3743b75d59
Modified handleEnter to insert a paragraph above/below a non-paragraph if at the edges
...
Change-Id: Icfe650890ceb32f77c79347bebdf8be9612cfdbb
2012-06-20 18:57:35 -07:00
Catrope
01407b1ec5
Merge "Typo fixes throughout the codebase"
2012-06-21 01:49:15 +00:00
Catrope
22677ac475
Merge "When there is a selection range, pressing arrow keys should not remove the selection in Firefox."
2012-06-21 01:48:30 +00:00
Christian Williams
58917f5015
When there is a selection range, pressing arrow keys should not remove the selection in Firefox.
...
Change-Id: I93bca05dd0f37fd8f87eba3f407a68c922ed66e3
2012-06-20 18:48:02 -07:00
Rob Moen
1462a6cf37
Add commented-out tab key support for indentation button tool
...
Change-Id: I4741182bb79becf08288287142a930ddf7f547ad
2012-06-20 18:45:44 -07:00
Inez Korczynski
c1225acb68
Fix method hasSlugAtOffset to return true when length of the element is 0
...
Change-Id: Icf43eb6adfcc45eaf1ae8ff146a029546341ba33
2012-06-20 18:18:49 -07:00
Inez Korczynski
a62e78292f
Add slugs inside empty branch nodes so cursor can be correctly placed.
...
Change-Id: I075a76da50bd4927c3832a660fdf96bbd250e3b0
2012-06-20 18:18:49 -07:00
Trevor Parscal
6fe115a563
Removed trailing whitespace and other cruft
...
Change-Id: I8c439d2a272e01b9e26bfd6b13d9e600d324930b
2012-06-20 17:42:12 -07:00
Christian Williams
93594d1c22
Pressing backspace or delete at boundary of dislike nodes will cause adoption
...
Change-Id: Idd6cd40c8d4f34081851fc9ea1cc70037915244b
2012-06-20 16:28:13 -07:00
Trevor Parscal
e175292c07
Typo fixes throughout the codebase
...
And a missing semicolon
Change-Id: I8487525ae2a7fa8f58e00c92c7dff600d9bd9520
2012-06-20 16:01:02 -07:00
Inez Korczynski
bbaa17a6c4
* Replace spaces at the beginning and at the end of text node with
...
* Alternate double spaces with  , " " -> " "
Change-Id: Ib4351ed6263e69f0d98957c2d0d8411e040fece7
2012-06-20 15:32:14 -07:00
Trevor Parscal
bcf93eb695
Automatically bind and unbind context's window event bindings on documentNode focus and blur
...
Change-Id: Ie43165da49a36a7d0d13a52318d9c5438dad9605
2012-06-20 12:34:20 -07:00
Trevor Parscal
7a1d74fd18
Change state variable so updates work more than once
...
Change-Id: I7c701761b09e96e01e26164080d22cafe43019e0
2012-06-20 12:28:01 -07:00
Catrope
6afed5e5cc
Move ve2/ back to ve/
...
Change-Id: Ie51d8e48171fb1f84045d1560ee603cee62b91f6
2012-06-19 18:20:28 -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
Christian Williams
32b9ccd0bf
Moving alien node styling to CSS file
...
Change-Id: I21e4593b81669b48cec831236398866f89616f9a
2012-05-23 12:03:28 -07:00
Rob Moen
b05347ac4e
removed margin-top for documentNode
...
Change-Id: I6e888ca858bc2d9e6772150715b10ab157f84b46
2012-05-03 16:07:51 -07:00
Inez Korczynski
d6ae8390f5
Get rid of selectionDirection. Introduce getDirection() methdo in
...
ve.Range.
Change-Id: Iaf11b2dbfb7ae82a7f54ee205cd6cdc8ee235aef
2012-04-27 17:36:55 -07:00
Inez Korczynski
af6a9f9ccc
Created a named method inside a Surface (instead of anonymouse one) to
...
handle logic for rangeChange event handler.
Change-Id: Ief32e647f9399e3ea47c5613902cebcbaaf4874c
2012-04-27 17:31:49 -07:00
Inez Korczynski
f188772259
Introduce new method called "proxy" in surfaceView to avoid using the same
...
construct with anonynous function over and over.
Change-Id: I1e96cf1efaa6fa5d551fdfa8bb5a80c31e519579
2012-04-26 14:49:12 -07:00
Rob Moen
5fc9f1c7e4
Modify rangeChange event to save selection direction.
...
Renamed Selection method to more suitable name.
Misc cleanup
Patchset 2, whitespace cleanup
Patchset 3: Change values used with selection direction to -1 or 1
1 for left to right (normal)
-1 for right to left (opposite)
Change-Id: If9ecc721ace1c7550903170f92395947f1ccc22c
2012-04-20 16:27:26 -07:00
Rob Moen
d37a325f44
Cleanup terms used in annotation method
...
Change-Id: I509a1f1b680cc8a2973188f0ed7c7d67b8a15f4f
2012-04-12 16:37:23 -07:00
Rob Moen
961f83d326
Elminiated isSelection method
...
Determine actual selection from model by checking length
Change-Id: I1c58a4de31b26d49b55c7a2c55c9c6462741bdfb
2012-04-12 14:05:14 -07:00
Rob Moen
28e86c8688
New Method isSelection() in Surface View
...
Used to properly hide/show Context menu and UI elements.
Change-Id: I8b3750c270651498b7e6c54a1921f5012cf33ea6
2012-04-12 10:22:42 -07:00
Rob Moen
b5befb1d57
On annotate, get current selection from model
...
Fixes link annotation, and any annotation that pops up an inspector as selection is lost.
Change-Id: Idd8812b05f4fddfa4e613dea28a1a8421792656d
2012-04-11 14:15:52 -07:00
Rob Moen
224cc1f9a0
Migrate tools from SurfaceObserver Class
...
ContextView positioning, Italic, and Bold annotations working
Change-Id: Ifc68bd61c8f27b6a14d314dc2999753af6e0ee04
2012-04-11 13:19:58 -07:00
Rob Moen
01e02e888d
Fix copy / paste errors for setStyle method in ListNode and ListeItemNode
...
Change-Id: Ifc8183e047398fd7f4b0436e61768992a3a94612
2012-04-06 11:37:53 -07:00
Robmoen
8a06ea5adc
Merge "Changed to using structured lists"
2012-04-06 18:28:04 +00:00
Inez Korczynski
50acc0c785
Make toolbar and context menu works
...
Change-Id: Ice981390b22a257158b3417dda3a1945d777cb14
2012-04-06 17:43:14 +02:00
Inez Korczynski
68cf13fb1e
getLeafNode is now a static method and should be called as a static method
...
Change-Id: I4f079523add81ef14537c950b29436422e1de850
2012-04-06 17:13:43 +02:00
Inez Korczynski
a57ae2692e
Merge changes from branch ce-poll
...
Change-Id: Ibb6da1ac5229ed5afeda1a3944fe7deff3bfb9a7
2012-04-06 17:10:30 +02:00
Inez Korczynski
090e42c8d9
Just a test
...
Change-Id: I74fb371a26b4b6068fee593bf7e6ee950080bca8
2012-04-06 16:49:30 +02:00
Trevor Parscal
85b807ed5d
Changed to using structured lists
...
This makes it possible to get identical rendering in the editor, but may make other things more complex. The Wikitext serializer is no longer compatible for rendering lists so it's been stubbed out. Also the way the toolbar works with lists is broken, so that's been disabled. The HTML serializer has been fixed to work correctly and no-longer-used styles have been removed.
Change-Id: If156f55068b1f6d229b3fa789164f28b2e3dfc76
2012-04-05 14:32:08 -07:00
Trevor Parscal
a2eee63525
Updated CSS classes and rules for CE, which for the most part uses native elements
...
Also:
* Simplified ve.ce.Surface.getLeafNode, which may be better to just be removed and be used inline in the few places it's being used.
* Removed method wrapper for static function ve.ce.Surface.getLeafNode
Change-Id: I1d4cf0bb7ecc8f07f030753e40a13ebef7d02daa
2012-04-04 11:54:06 -07:00
Rob Moen
d8de26d7e9
On selection, update selection in the model. Fixes selection.clone() error.
...
Change-Id: Ibd5cf0398002e5fbb2c50549e4a7043ba8fd00a7
2012-04-02 14:19:53 -07:00
Rob Moen
c1300ba949
Fixed surfaceView undefined error
...
Change-Id: Iba3ae54b4e508afbfa132e0f0b2b0b237e685395
2012-04-02 13:49:45 -07:00
Inez Korczynski
299c77db84
Make LinkInspector works (using annotate method in SurfaceView)
2012-03-16 22:16:15 +00:00
Inez Korczynski
b2f4b48a9a
Use on and off insteaf of bind and unbind.
2012-03-16 22:01:09 +00:00
Inez Korczynski
6ef8ac182a
No more endless looping! And fix getSelectionRect to return document relative coordiantes instead of viewport relative.
2012-03-16 21:52:17 +00:00
Rob Moen
cde7a3bf7e
adapt LinkInspector to use surfaceObserver for selection
2012-03-16 20:18:26 +00:00
Rob Moen
93376d68eb
add surfaceObserver on select methods to ui toolbar and surfaceView for responding to select event. tools now updating to selected node annotations. revise getSelectionRect to return actual start & end pos. context icon properly showing on range selection
2012-03-15 22:06:40 +00:00
Inez Korczynski
f87709d6bb
Use <h[1-6]> tags for rendering headings (instead of divs)
2012-03-14 00:51:04 +00:00
Inez Korczynski
294d474c54
Replace CursorObserver and ContentObserver with SurfaceObserver
2012-03-14 00:04:24 +00:00
christian
d174809b54
replacing showCursorAt calls with correct showCursor method
2012-03-13 18:12:57 +00:00
christian
010c97acc8
removing min height attribute to fix IE bug
2012-03-12 23:31:08 +00:00
christian
ba437744b3
preventing native contenteditable resizing tools
2012-03-12 23:06:47 +00:00
Rob Moen
22a351e855
small fix: getSelectionRange was breaking the surface layer, changed to saved state member
2012-03-12 22:04:29 +00:00
Rob Moen
65170e13df
port over select event listener, and updateSelection methods for setting and removing context icon, add getSelectionRect method for context icon position
2012-03-12 21:50:22 +00:00
christian
56b9068d03
switch to getSelectionRange and fixing IME native menu
2012-03-12 20:39:08 +00:00
Alexandre Emsenhuber
99a31bacbc
svn:eol-style native
2012-03-11 18:38:27 +00:00
Inez Korczynski
9a8f7059fc
Make ContentObserver pass information about content when emiting change event.
2012-03-09 23:15:23 +00:00
Trevor Parscal
02592b3ec0
More cleanup
2012-03-09 22:55:49 +00:00
Trevor Parscal
60c9c484aa
More cleanup (jshint complaints)
2012-03-09 22:51:00 +00:00
Trevor Parscal
ce824d6299
Cleanup
2012-03-09 22:45:22 +00:00
Inez Korczynski
4bc7dbbe5e
Initial import of CursorObserver and ContentObserver (not being used yet).
2012-03-09 22:18:24 +00:00
Alexandre Emsenhuber
62e8312535
svn:eol-style native
2012-03-08 12:27:02 +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
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
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