-
Notifications
You must be signed in to change notification settings - Fork 6
/
features.txt
54 lines (40 loc) · 2.17 KB
/
features.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Outstanding Features
--------------------
- Surround all text nodes with span with class, remove class, test for class. Generalise to any action on text nodes
within a selection.
Question: http://stackoverflow.com/questions/2887101/apply-style-to-range-of-text-with-javascript-in-uiwebview/2888969#2888969
Requires:
- get text nodes in selection
- range intersects node
- range boundaries as node/offsets
- Insert node/HTML (with ability to select or place caret before or after inserted node)
Question: http://stackoverflow.com/questions/2213376/how-to-find-cursor-position-in-a-contenteditable-div/2213514#2213514
- Test empty selections?
- Return range/selection objects from suitable methods to allow chaining?
Core features
-------------
- DomRange: setBoundaries(startNode, startOffset, endNode, endOffset) ?
- DomRange: implement getBoundingClientRect? (https://developer.mozilla.org/en/DOM/range.getBoundingClientRect)
Utility module features
-----------------------
- insertHtml? http://stackoverflow.com/questions/6690752/insert-html-at-cursor-in-a-contenteditable-div/6691294#6691294
- getElementText?
- get range/selection coordinates: http://stackoverflow.com/questions/4122315/how-to-find-xy-position-in-javascript-with-offset/4123495#4123495
- Get range start/end container element
Potential Modules
-----------------
- select event simulation
- Generic command applier
- Utils
References:
http://mozile.mozdev.org/0.8/doc/jsdoc/overview-summary-InternetExplorerRange.js.html
http://mozile.mozdev.org/0.8/doc/jsdoc/overview-summary-InternetExplorerSelection.js.html
http://code.google.com/p/ierange/source/browse/trunk/ierange.js
http://closure-library.googlecode.com/svn/docs/closure_goog_dom_abstractrange.js.source.html
http://trac.webkit.org/browser/trunk/Source/WebCore/dom/Range.cpp
http://trac.webkit.org/browser/trunk/Source/WebCore/page/DOMSelection.cpp
http://mxr.mozilla.org/mozilla-central/source/content/base/src/nsRange.cpp
http://code.google.com/p/ierange/issues/list
http://xerces.apache.org/mirrors.cgi#source
http://www.cinsoft.net/mylib-textselection.js
http://dev.w3.org/html5/spec/editing.html#selection