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:
Copy code<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:
Copy code<quote><h>st</h></quote><p>se</p>Parameters
model: ModelThe model in context of which the selection modification should be performed.
selection: ModelSelection | ModelDocumentSelectionThe selection of which content will be returned.
Returns