engine/model/utils/getselectedcontent
module
Functions
-
getSelectedContent( model, selection ) → ModelDocumentFragment
internalmodule:engine/model/utils/getselectedcontent~getSelectedContent
Gets a clone of the selected content.
For example, for the following selection:
<p>x</p><quote><p>y</p><h>fir[st</h></quote><p>se]cond</p><p>z</p>
It will return a document fragment with such a content:
<p>x</p><quote><p>y</p><h>fir[st</h></quote><p>se]cond</p><p>z</p>
Parameters
model : Model
The model in context of which the selection modification should be performed.
selection : ModelSelection | ModelDocumentSelection
The selection of which content will be returned.
Returns