Roan Kattouw
6832be68ed
Fix test #30 : was failing because getScope() was broken and insert() didn't account for the case of inserting something like </list><list> at a structural offset. All tests are now passing, yay!
...
* Fix getScope()
** Drop the -1 which caused the result to be off by one level
** Prevent JS errors from occurring if bad input causes the loop to try to traverse up above the root node
* insert()
** Detect the case where the input data tries to close the containing element; in that case, we'll get scope != node
** Move the getNodeFromOffset() and getScope() calls up and out of the conditionals
** Remove unnecessary parent==model conditional, no longer needed now that getScope() can safely handle things that try to traverse too far up
** Add some comments to explain what's going on. I'll restructure this function a bit more shortly
2012-01-31 16:43:21 +00:00
Trevor Parscal
fef6d5525e
- Added auto-link selection when opening the link editor without selecting any text
...
- Resolves bug #33049
2011-12-13 23:12:27 +00:00
Inez Korczynski
f27be7c238
Better implementation of history panel
2011-12-13 00:56:29 +00:00
Inez Korczynski
135adbf443
Make purgeHistory method work in SurfaceModel with new data structure
2011-12-12 22:51:32 +00:00
Inez Korczynski
62a589e185
Fix bug: cursor is not visible when you click outside of surface and then click back in the surface at the same offset where cursor was before
2011-12-10 10:33:00 +00:00
Inez Korczynski
4e39b41727
Make ctrl+y execute redo
2011-12-10 00:02:47 +00:00
Inez Korczynski
364a1a94b9
Simple implementation of undo/redo functionality that works.
2011-12-09 23:52:41 +00:00
Trevor Parscal
49041942cc
Added support for loading multiple documents in the demo/sandbox
2011-12-09 20:40:26 +00:00
Inez Korczynski
ed44f13aa0
Revert r105509 and r105507 - taken approach is not gonna work
2011-12-08 03:14:10 +00:00
Inez Korczynski
8fece3a241
Temporary fix for transact method to accept array of transactions.
2011-12-08 01:17:08 +00:00
Neil Kandalgaonkar
c0a02cd6c3
undo almost working, still anomalies in selects (particularly first)
2011-12-07 22:28:07 +00:00
Trevor Parscal
8505b3b566
* Simplified context menu
...
* Added typeOnly option to getIndexOfAnnotation
* Fixed overly-strict checking for annotations in toolbar
2011-12-07 19:16:40 +00:00
Trevor Parscal
b1f54c5ae5
Refactored annotation of content - now there's an annotate method in surface view
2011-12-06 23:48:47 +00:00
Trevor Parscal
ee1caca875
Only act on selection change if it changed
2011-12-06 22:45:38 +00:00
Trevor Parscal
68a0026f56
Disabled console logging
2011-12-06 22:14:48 +00:00
Trevor Parscal
7ed901d74c
Bypass processing if there's no annotations
2011-12-06 21:28:21 +00:00
Neil Kandalgaonkar
dbe4890ed6
Simplified transaction model, introduced isPartial for some deletes
2011-12-06 01:52:38 +00:00
Neil Kandalgaonkar
e3fc95f41a
Revert r104884 "no longer track selections in states. Also makes the 'combine' parameter obsolete"
...
This reverts git-svn commit e4e3468605c97bd5e611fdf8fc80c04e034e4eb4.
This reverts svn commit r104884
2011-12-06 01:52:34 +00:00
Inez Korczynski
8ec3fb5b81
Bunch of fixes for IE8
2011-12-05 21:37:38 +00:00
Trevor Parscal
2d7d4866bc
Fixed misnamed method, and off by one issue when getting content data from a document
2011-12-05 20:08:49 +00:00
Trevor Parscal
07af0cab63
* Moved getContent and getText from leaf nodes to document model nodes
...
* Renamed getContent to getContentData
* Renamed getText to getContentText
* Added getElementData
2011-12-05 19:41:04 +00:00
Inez Korczynski
31585463ed
get rid of console.logs
2011-12-02 01:37:23 +00:00
Inez Korczynski
21d78b3c3e
getAnnotationsFromRange should return list of annotations even if there are elment offset in between of them
2011-12-02 01:36:12 +00:00
Inez Korczynski
874e8aa40a
Missing changes for FormatDropdownTool support
2011-12-02 00:02:16 +00:00
Trevor Parscal
380f016840
* Split the result of getAnnotationsFromRange to provide full, partial and all lists
...
* Fixed tools to use this data correctly
2011-12-01 23:25:56 +00:00
Inez Korczynski
2686b383d9
Added FormatDropdownTool, so now you can switch leaf nodes from paragraphs to pres for instance
2011-12-01 23:24:21 +00:00
Inez Korczynski
1db55a8242
Added pretty solid implementation of prepareLeafConversion method
2011-12-01 22:45:32 +00:00
Inez Korczynski
02f2e47e91
Very early version of convertLeafs method (still does not work perfect due to problems wiht selectNodes method)
2011-12-01 21:10:37 +00:00
Neil Kandalgaonkar
71542b45d7
no longer track selections in states. Also makes the 'combine' parameter obsolete
2011-12-01 19:08:28 +00:00
Neil Kandalgaonkar
0f12bd9b59
get rid of separate undoState function
2011-12-01 19:08:24 +00:00
Neil Kandalgaonkar
b7cc76acd8
hasTransaction -> hadTransaction
2011-12-01 19:08:18 +00:00
Neil Kandalgaonkar
d82a706170
undoes changes, cursor still does not move properly
2011-12-01 19:07:40 +00:00
Trevor Parscal
0f123a6d2f
Removed unneeded condition
2011-12-01 01:03:34 +00:00
Trevor Parscal
85526a7d46
Normalize selection before use!
2011-12-01 01:01:27 +00:00
Trevor Parscal
049b82fb98
Moved images to es
2011-11-30 23:54:12 +00:00
Trevor Parscal
12a20a5fe7
Limited select event emitting to when selection changes
2011-11-30 23:50:32 +00:00
Trevor Parscal
d2d73166a8
Removed soft undo stuff
2011-11-30 22:06:19 +00:00
Trevor Parscal
edd7e6e76d
Added support for RegExp when using the clear method in prepareContentAnnotation
2011-11-30 19:21:33 +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
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
Trevor Parscal
c1a3d4095f
Got rid of optimize() - now performing consecutive-type operation merging on the fly
2011-11-23 23:54:36 +00:00
Inez Korczynski
1cdd4ed0d3
Fix off by one bug in getRelativeContentOffset
2011-11-23 09:04:06 +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
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
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