id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc 7828,Improvements to the selection API and documentation,Teresa Monahan,,"We would like to see improvements in the selection API and associated documentation for CKEditor. Some of our products are extending the editor to support features such as content-assist, word completion, extracting the selection into new documents etc. While the CKEditor selection API does a good job of isolating us from browser differences, it is very difficult to figure out how to use and could be more robust in what API it provides. Suggestions on areas where we would like the API extended and better documentation are included below: '''API to help user query selection:'''[[BR]] a) Get the plain text of the selection.[[BR]] b) Get html behind selection (properly formed)[[BR]] c) Get element at cursor [[BR]] d) Proper selection change API (see ticket #6443)[[BR]] e) Find out if the selection is contained in a single block element, or spans more than one block element.[[BR]] f) Find out if the selection spans any markup. '''API to help user modify selection:'''[[BR]] a) Adjust the selection to remove leading or trailing the whitespace. (Double-click selects word plus trailing whitespace, whereas most of our operations are likely to want to work on just whole words).[[BR]] b) Expand selection to span complete words.[[BR]] c) Expand selection to whole block.[[BR]] d) Reduce selection to be contained in one block. '''Better documentation/examples around range/selection/bookmark functionality:''' [[BR]] a) What is the difference between bookmark and bookmark2, and when should I use one rather than the other?[[BR]] b) When does a selection/range/bookmark become invalid.[[BR]] c) Useful examples of how to use selection/range/bookmark API [[BR]]",New Feature,confirmed,Normal,,General,3.0,,IBM,Damian Satya Minnekanti James Cunningham