engine/model/utils/getselectedcontent
module
Functions
getSelectedContent( model, selection ) → ModelDocumentFragmentinternalmodule:engine/model/utils/getselectedcontent~getSelectedContentGets 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>Copy codeIt will return a document fragment with such a content:
<quote><h>st</h></quote><p>se</p>Copy codeParameters
model : ModelThe model in context of which the selection modification should be performed.
selection : ModelSelection | ModelDocumentSelectionThe selection of which content will be returned.
Returns