Trevor Parscal
dc575227f6
Fixed a typo
2011-11-30 23:33:07 +00:00
Trevor Parscal
12531f59ad
Fixed image links and switched to using inline block for toolbar
2011-11-30 23:29:54 +00:00
Trevor Parscal
319cc6a624
Moved toolbar view styles
2011-11-30 23:21:17 +00:00
Trevor Parscal
306ebb936a
Made context icon update with selection updates
2011-11-30 23:19:56 +00:00
Trevor Parscal
10f4f0bd2c
Removing unused styles
2011-11-30 23:18:09 +00:00
Inez Korczynski
55c24023f2
Refactoring of Toolbar tools
2011-11-30 23:05:06 +00:00
Inez Korczynski
c157c26d90
Refactoring of Toolbar tools
2011-11-30 23:00:19 +00:00
Trevor Parscal
f218b15ff1
Fixed floating issues with toolbar
2011-11-30 22:44:11 +00:00
Trevor Parscal
e540c87d98
Added toolbar view to context menu (needs some work)
2011-11-30 22:35:06 +00:00
Trevor Parscal
0b72dcba33
Fixed context menu positioning
2011-11-30 22:30:35 +00:00
Trevor Parscal
b18fffdcf0
Moved more styles around
2011-11-30 22:15:03 +00:00
Trevor Parscal
d2d73166a8
Removed soft undo stuff
2011-11-30 22:06:19 +00:00
Trevor Parscal
caf1bb0e0b
Split context view styles out of surface styles
2011-11-30 20:45:24 +00:00
Trevor Parscal
9ab792704d
Fixed image links
2011-11-30 20:42:59 +00:00
Trevor Parscal
57434fa734
Moved styles
2011-11-30 20:39:49 +00:00
Trevor Parscal
086b4f46ca
Fixed context menu position when scrollTop is non-zero
2011-11-30 19:55:44 +00:00
Trevor Parscal
edd7e6e76d
Added support for RegExp when using the clear method in prepareContentAnnotation
2011-11-30 19:21:33 +00:00
Inez Korczynski
cb38a7527b
Added title attributes for ButtonTool and DropdownTool divs
2011-11-30 18:24:54 +00:00
Gabriel Wicke
82e31ffd42
Do not allow newlines in various attributes
2011-11-30 15:12:53 +00:00
Gabriel Wicke
821162484e
Allow inlines in the term part of ; term : definition
2011-11-30 14:53:28 +00:00
Gabriel Wicke
f758894de7
Let another test pass by swapping the default order of italic/bold for '''''.
...
Minor test output cosmetics.
2011-11-30 13:54:57 +00:00
Gabriel Wicke
e0fca805a6
Expand tabs in grammar.
2011-11-30 13:42:26 +00:00
Gabriel Wicke
2bb512a4de
A bit of tokenizer grammar clean-up and additional expected-html
...
normalization. 99 parser tests now passing.
2011-11-30 13:40:17 +00:00
Gabriel Wicke
127d8c8621
Simplify DOM paragraph wrapping postprocessor
2011-11-30 12:28:45 +00:00
Inez Korczynski
72ec73c063
Placeholder for FormattingDropDown and ClearButton in Toolbar
2011-11-30 08:07:22 +00:00
Inez Korczynski
4d3e38756f
Make Bold and Italic toolbar buttons works (when clicked)
2011-11-30 07:42:10 +00:00
Inez Korczynski
af39b6dc47
Make toolbar buttons Bold and Italic reflect state of current selection
2011-11-30 07:35:59 +00:00
Inez Korczynski
9aa9188798
Create separated classes for each toolbar tool (so far only bold and italic). Use CSS classes instead of img tags for toolbar buttons styling.
2011-11-30 07:10:15 +00:00
Trevor Parscal
dee9a0df01
* Using DOM for more of the icon style
...
* Fixed double-selection rendering issue
2011-11-30 01:23:37 +00:00
Trevor Parscal
cc04f0f830
More example tweaks
2011-11-30 00:51:11 +00:00
Trevor Parscal
d926cc7165
Fixed some display issues
2011-11-30 00:48:46 +00:00
Trevor Parscal
68c5487c61
Added clear button to menu
2011-11-30 00:35:58 +00:00
Trevor Parscal
3b954819ea
Moving images back to where they were
2011-11-30 00:25:17 +00:00
Trevor Parscal
69d986d2ec
Added images to menu buttons
2011-11-30 00:19:27 +00:00
Trevor Parscal
b3e669d988
Moved images
2011-11-30 00:15:43 +00:00
Trevor Parscal
f49ae59e47
Renamed bullet icon
2011-11-30 00:13:07 +00:00
Trevor Parscal
149598e5bc
Renamed bullet icon
2011-11-30 00:12:51 +00:00
Trevor Parscal
119700856d
Added more example menus
2011-11-30 00:06:46 +00:00
Trevor Parscal
62be093c65
Added example menu items
2011-11-29 23:48:11 +00:00
Trevor Parscal
9d34341beb
Added es.ContextView
2011-11-29 23:29:02 +00:00
Inez Korczynski
0c814b4d61
Fix revision r103997
2011-11-29 21:34:56 +00:00
Inez Korczynski
ffdf68c50b
Put $input (textarea) in the same place where cursor is (so it can follow its position nicely)
2011-11-29 21:32:41 +00:00
Trevor Parscal
165ef639bd
Darkened the borders of the toolbar and editor panes
2011-11-29 21:11:30 +00:00
Gabriel Wicke
f0edc5cb9a
Fix a few more tests by allowing inline content inside links. 76 now passing.
2011-11-29 18:43:27 +00:00
Gabriel Wicke
ae0b5f9af4
* Split paragraph handling between tokenizer and DOM postprocessor for better
...
html markup handling.
* Remove global 'use strict' declarations from html5 parser.
* Add trailing whitespace handling in dt
Overall, 55 parser tests are now passing.
2011-11-29 15:11:51 +00:00
Inez Korczynski
fb9348dbb9
Use spacer element for floating toolbar instead of relaying on padding-top of next sibiling.
2011-11-29 01:13:50 +00:00
Inez Korczynski
dc7e601ef0
Make toolbar float nicely in demo and in MediaWiki sandbox special page.
2011-11-29 00:58:40 +00:00
Trevor Parscal
2ecd479349
Moved some styles over to the demo
2011-11-29 00:09:37 +00:00
Trevor Parscal
3b18667821
Fix for empty content rendering issue
2011-11-29 00:00:02 +00:00
Inez Korczynski
77486cf8f2
Support select all (ctrl/metakey + a) on mac
2011-11-28 23:54:22 +00:00
Trevor Parscal
7c9140d4b4
Fixed margins so they look/work right on both demo and sandbox
2011-11-28 23:53:34 +00:00
Inez Korczynski
c80b1d5fb0
Fix the problem with disappearing selection/ranges elements
2011-11-28 23:29:09 +00:00
Inez Korczynski
6a1bd05703
Support for select all (ctrl+a)
2011-11-28 22:47:07 +00:00
Trevor Parscal
9c98969fa9
Removed setting contentLength from data.length - adding nodes adjusts the contentLength automatically
2011-11-28 22:38:30 +00:00
Inez Korczynski
41a4b432db
Cursor should always have height set dynamically within showCursor method so those two CSS propety are not relevant anymore.
2011-11-28 22:01:12 +00:00
Inez Korczynski
6e36c7c439
Put cursor directly in body element. This way it still can be positioned absolutly but without risk that some other element using position other than "static" (like #bodyContent) will change positioning context.
2011-11-28 21:58:46 +00:00
Trevor Parscal
e4faa39ab3
Fixed z-index issue in special page
2011-11-28 20:57:01 +00:00
Trevor Parscal
111ce5ada3
Initial MediaWiki Integration
2011-11-28 20:28:28 +00:00
Gabriel Wicke
b16c295b98
Consider dl as a block-level element.
2011-11-28 16:54:58 +00:00
Gabriel Wicke
d3f0196df7
Add primitive HTML comparison to detect passing parser tests. The expected
...
HTML is parsed using a HTML parser and re-serialized, and the output compared
to the serialization of the new parser's dom. Newline normalization is a
cheap hack for now, need to improve that later.
2011-11-28 11:10:39 +00:00
Gabriel Wicke
6b8c109cf0
Separate block-level tags in tokenizer to delimit inlines and avoid wrapping
...
block-level in paragraphs.
2011-11-25 17:41:26 +00:00
Gabriel Wicke
859379a635
Improvements to nowiki/pre interaction. Will need to distinguish block-level
...
tags from inline HTML tags next.
2011-11-25 15:02:44 +00:00
Gabriel Wicke
dd5cd59ac6
Better HTML, pre and blocklevel handling. Hackish source formatting for easier
...
comparison with parserTest results.
2011-11-25 12:47:03 +00:00
Gabriel Wicke
5b3a4497aa
Add generic HTML tokenization and nowiki handling.
2011-11-25 10:59:43 +00:00
Roan Kattouw
5ac817a6f4
Fix bugs in prepareContentAnnotation() related to structural offsets, and add a test. Also add parenthesis to the if statement mixing || and &&, for clarity
2011-11-24 16:27:40 +00:00
Roan Kattouw
815029f6db
Fix the prepareContentAnnotation test cases added in r104102
2011-11-24 16:13:19 +00:00
Roan Kattouw
d98a7bd373
Refacor things to use getCommonAncestorPaths()
2011-11-24 15:55:54 +00:00
Roan Kattouw
6f3c407314
Introduce es.DocumentNode.getCommonAncestorPaths(), with tests
2011-11-24 15:34:12 +00:00
Gabriel Wicke
6c36ddcbce
Follow-up to r104164: Clean-up comments, remove old italic/bold productions.
2011-11-24 14:20:56 +00:00
Gabriel Wicke
dee262658f
Add MediaWiki-compatible quote handling including quirks and overlapped
...
structures like ''[[Link|Link text'']]. This is another transform on the token
stream.
2011-11-24 13:56:30 +00:00
Roan Kattouw
e91d7ddaaf
Remove unused variable index in es.TransactionProcessor.insert()
2011-11-24 13:38:48 +00:00
Inez Korczynski
ea29c15f32
Added formatting dropdown to toolbar - but it does not work yet.
2011-11-24 01:02:19 +00:00
Trevor Parscal
30ede21d46
No need to fallback to zero, delay must be non-zero for the setTimeout to be run
2011-11-24 00:01:11 +00:00
Trevor Parscal
1b633ede21
Took time-buffered actions out of a timeout if delay is undefined or 0
2011-11-23 23:57:54 +00:00
Trevor Parscal
c1a3d4095f
Got rid of optimize() - now performing consecutive-type operation merging on the fly
2011-11-23 23:54:36 +00:00
Trevor Parscal
b8b3ed57e2
Added time-buffer to emitting updates
2011-11-23 23:42:41 +00:00
Trevor Parscal
a7a771e06c
Another major performance improvement for updated annotated retentions
2011-11-23 23:40:38 +00:00
Trevor Parscal
ff5ba54115
Switched to a WAY faster method of updating annotated retained regions
2011-11-23 23:37:27 +00:00
Trevor Parscal
dab042b52f
Prevented classes from being removed and reset when they didn't actually change
2011-11-23 23:22:59 +00:00
Trevor Parscal
1fa9dfef3c
Made class replacement catch spaces too, so we don't keep adding more and more spaces each time we update the class of a heading
2011-11-23 23:17:34 +00:00
Trevor Parscal
22c70e0154
* Added node updates for annotation+retain transactions
...
* Added time-buffered updates for selection/cursor
2011-11-23 22:21:46 +00:00
Trevor Parscal
fc17703f01
Added combine arguments where needed
2011-11-23 22:00:01 +00:00
Inez Korczynski
a4c71510d3
Early stage implementation of toolbar
2011-11-23 21:50:47 +00:00
Gabriel Wicke
baf55875b9
Re-add modified wiki list handling to tokenizer.
2011-11-23 14:27:51 +00:00
Inez Korczynski
1cdd4ed0d3
Fix off by one bug in getRelativeContentOffset
2011-11-23 09:04:06 +00:00
Inez Korczynski
69b11c3399
Build VisualEditor toolbar dynamicly based on configuration.
2011-11-23 07:11:31 +00:00
Inez Korczynski
8c200c94aa
Initial separation of toolbar code into ToolbarView
2011-11-23 01:19:11 +00:00
Trevor Parscal
ed463eb075
Added soft undo/redo
2011-11-23 00:59:57 +00:00
Trevor Parscal
9beda20191
Routed selection through the SurfaceModel
2011-11-23 00:36:46 +00:00
Trevor Parscal
20da830a26
Rewrite of undo/redo - now completely implemented in es.SurfaceModel
2011-11-22 22:59:05 +00:00
Trevor Parscal
df88d82181
Using the full word Difference instead of Diff
2011-11-22 22:57:23 +00:00
Trevor Parscal
6b19489742
Added new line at the end of the file
2011-11-22 22:56:49 +00:00
Inez Korczynski
1186949675
Fix bug in deletion: callback for traverseUpstream should get parent of current node, not of the node from which traversal started.
2011-11-22 20:11:23 +00:00
Inez Korczynski
2d8440132e
Fix setInterval bug in IE (in IE setInterval doesn't take 3rd parameter)
2011-11-22 19:59:18 +00:00
Gabriel Wicke
694b998f24
Minor improvement to italic/bold, documentation on failed modularization of
...
static parser functions.
2011-11-22 16:51:05 +00:00
Inez Korczynski
b60a82c50e
Make toolbar float when scrolling the page
2011-11-22 07:17:08 +00:00
Inez Korczynski
0fef27aae7
Fix bug with selecting words
2011-11-22 02:23:39 +00:00
Trevor Parscal
56d05ce855
Reverted an issue in r103873 - fall through was intentional
2011-11-22 01:25:15 +00:00
Trevor Parscal
5bb01d20ef
Backing out history integration for now
2011-11-22 00:26:50 +00:00
Trevor Parscal
ee12891dbe
Added support for meta key (mac command key) for undo/redo
2011-11-21 23:54:57 +00:00
Trevor Parscal
70147a166d
Fixed breaks in a switch being inside ifs, causing them not to properly terminate the switch
2011-11-21 23:53:37 +00:00
Trevor Parscal
631323b9bd
* Refactored es.HistoryModel to always be working from a single array rather than a buffer and an array
...
* Added support for associating a selection with a state
2011-11-21 23:51:37 +00:00
Inez Korczynski
68ea54fcf3
Bind ctrl+z to history undo and ctrl+y to history redo.
2011-11-21 23:25:43 +00:00
Inez Korczynski
392d911c3d
States is an array of array of transaction, so one more iteration is needed.
2011-11-21 23:10:31 +00:00
Trevor Parscal
e0f746d3d5
Installed HistoryModel into SurfaceView
2011-11-21 22:59:40 +00:00
Inez Korczynski
db7b4dff64
Auto scroll to cursor is showCursor method
2011-11-21 22:55:48 +00:00
Trevor Parscal
6f8d229416
Cleaned up some issues with scoping, line ending, variable redeclaration, etc.
2011-11-21 22:43:56 +00:00
Trevor Parscal
779a63f486
* Switched to using JSON for hashing, allowing us to use the native JSON.stringify where available, which is much faster
...
* Added a bunch of utility functions for working with character data and annotations
* Got toolbar button states to follow selection of more than one character
2011-11-21 22:32:22 +00:00
Trevor Parscal
9590783f50
Added emitting selection on mouse move
2011-11-21 22:07:03 +00:00
Inez Korczynski
f840fb7a1f
Created generic function 'handleDelete' that is used for content deletion initiated with backspace or delete keys.
2011-11-21 21:50:14 +00:00
Gabriel Wicke
d1b0293569
Fix comment token conversion and serialization
2011-11-21 09:22:30 +00:00
Inez Korczynski
61cfdb58fb
Improve logic for moving cursor up and down - especially in case of initialBias - code has to be refactored.
2011-11-19 03:07:27 +00:00
Inez Korczynski
77ff26d61d
Improve logic for moving cursor up and down - especially in case of initialBias - code has to be refactored.
2011-11-18 23:21:33 +00:00
Inez Korczynski
ed299c01d9
Reset value of initialBias and initialLeft states after pressing backspace/delete/enter or typing text
2011-11-18 20:09:13 +00:00
Inez Korczynski
bd92a3aaf8
Improve logic for moving cursor up and down - especially in case of initialBias.
2011-11-18 19:57:53 +00:00
Inez Korczynski
bf1b9a881f
Improve logic for moving cursor up and down - especially in case of initialBias.
2011-11-18 19:48:43 +00:00
Gabriel Wicke
65afd9b610
Improve internal link handling
2011-11-18 14:48:32 +00:00
Gabriel Wicke
d744e65c48
Add missing token adapter.
2011-11-18 14:00:14 +00:00
Gabriel Wicke
b750ce38b8
Add node.js-compatible HTML5 parser and hook it up to the PEG tokenizer.
...
Builds a DOM tree (jsdom) from the tokens and then serializes that using
document.innerHTML. This is all very experimental, so don't be surprised by
rough edges.
2011-11-18 13:57:07 +00:00
Roan Kattouw
35a99b4be0
Make es.TransactionProcessor.remove() handle deep merges correctly, and add test cases. The code is still a bit rough and ugly and needs a bit more work, but I'll clean that up later; at least it works now.
2011-11-18 10:17:35 +00:00
Inez Korczynski
2d4c253f5e
Place cursor in correct place after deleting selected content.
2011-11-18 08:10:56 +00:00
Inez Korczynski
535139919b
Support for "backspace" and "delete" when content is selected - also better support for typing when entire node is selected.
2011-11-18 07:52:28 +00:00
Inez Korczynski
85cf0c27e2
Implementation of static function es.DocumentViewNode.getSplitableNode
2011-11-18 06:49:00 +00:00
Inez Korczynski
9bfee0642c
Temporary handle listitems merging/spliting logic in SurfaceView until it will be fixed in transaction preparation (prepareRemoval)
2011-11-18 06:45:11 +00:00
Inez Korczynski
9df503e788
Proper handling for "delete" & "backspace" keys
2011-11-18 06:43:42 +00:00
Inez Korczynski
d02ed50211
Proper handling for "enter" key
2011-11-18 06:17:14 +00:00
Inez Korczynski
307ab3506b
Start from removing selected content if there is any when typing
2011-11-18 05:51:50 +00:00
Inez Korczynski
d0d8e35f34
Code cleanup in SurfaceView - no any major changes
2011-11-18 05:44:24 +00:00
Inez Korczynski
44d42babe6
Comment out line that is throwing "Object has no method" when trying to assign output of method to "index" variable, which is not used later anyway.
2011-11-18 05:35:08 +00:00
Inez Korczynski
383e4e324a
Added static function es.DocumentNode.traverseUpstream
2011-11-18 05:18:48 +00:00
Trevor Parscal
098c9118f2
Added first node preservation when rebuilding
2011-11-18 00:26:54 +00:00
Trevor Parscal
a9d29af962
Using overwrite instead of build and swap method for line data in es.ContentView objects - this way line data is valid between renders
2011-11-17 23:43:53 +00:00
Trevor Parscal
48e7f4c3c6
Initial checkin of new es.HistoryModel (needs tests)
2011-11-17 22:44:11 +00:00
Trevor Parscal
6fded56cec
Renamed es.Transaction to es.TransactionModel
2011-11-17 22:42:18 +00:00
Roan Kattouw
117c785d85
Improve the merging logic in prepareRemoval() to also allow merging nested nodes, e.g. by deleting </p></li><li><p>
2011-11-17 19:23:15 +00:00
Trevor Parscal
2497e96ccc
Added documentation to getScope and made it a little less confusing to read
2011-11-17 19:19:02 +00:00
Trevor Parscal
c3521b00fd
Fixed the last of the rendering to much bugs - now things are rendered when needed only
2011-11-17 19:05:06 +00:00
Trevor Parscal
a0d7c14238
Fixed passing global offset to emit event, preventing render from re-rendering because it thought the render-from point was well past it's length
2011-11-17 18:54:52 +00:00
Trevor Parscal
284082b5d3
Simplified documentation
2011-11-17 18:26:00 +00:00
Trevor Parscal
5784d5f6f5
Added some new documentation for the new merging rules
2011-11-17 18:23:53 +00:00
Trevor Parscal
824cea173a
Fix for r103479 - had sign backwards! :(
2011-11-17 18:16:02 +00:00
Trevor Parscal
b93a69c1bc
Addressing another issue in r103447 - minor adjustment to loop
2011-11-17 18:14:14 +00:00
Trevor Parscal
e30c2f8135
Addressed some issues identified in review of r103447 - this could be cleaner, but it's trying to be optimized so the UI doesn't flicker during a remove/insert (such as splitting a block)
2011-11-17 18:11:48 +00:00
Trevor Parscal
38d6673e09
Fix for issue identified in review of r103377 - this will make it so insertion at a structural offset will work even if the parent isn't the document
2011-11-17 18:05:14 +00:00
Roan Kattouw
f8fd9fd840
Add an extra offset parameter to selectNodes() and use it in the recursion, so the results of recursive calls don't need to have their globalRanges translated
2011-11-17 18:00:16 +00:00
Trevor Parscal
43de57840e
Commented out some console.log statements
2011-11-17 17:59:15 +00:00
Roan Kattouw
41ace08026
Replace prepareRemoval() with a fixed-up version of my rewrite (which was commented out previously)
2011-11-17 16:44:44 +00:00
Gabriel Wicke
11e487d8c0
Flatten inline token lists before merging text into text tokens.
2011-11-17 15:43:31 +00:00
Gabriel Wicke
ea87e7aaee
Convert PEG parser to tokenizer for back-end HTML parser. Now emits a list of
...
tokens, which for now is still completely built before parsing can proceed.
For each top-level block, the source start/end positions are added as
attributes to the top-most tokens. No tracking of wiki vs. html syntax yet.
2011-11-17 15:26:02 +00:00
Roan Kattouw
be994da373
Make selectNodes() also descend (recurse) into child nodes when only the start or only the end is in the middle of a child node. Without this, it was stuff like ranges with only openings and no closings.
2011-11-17 15:01:47 +00:00