minimap/utils
@ckeditor/ckeditor5-minimap/src/utils
Filtering
Functions
-
cloneEditingViewDomRoot( editor, rootName ) → HTMLElement
module:minimap/utils~cloneEditingViewDomRoot
protected
Clones the editing view DOM root by using a dedicated pair of
Renderer
andDomConverter
. The DOM root clone updates incrementally to stay in sync with the source root.Parameters
editor : Editor
The editor instance the original editing root belongs to.
rootName : String
The name of the root to clone.
Returns
HTMLElement
The editing root DOM clone element.
-
findClosestScrollableAncestor( domElement ) → HTMLElement | null
module:minimap/utils~findClosestScrollableAncestor
protected
Returns the closest scrollable ancestor of a DOM element.
TODO: Move to shared utils.
Parameters
domElement : HTMLElement
Returns
HTMLElement | null
-
getClientHeight() → Number
module:minimap/utils~getClientHeight
protected
TODO
Returns
Number
-
getDomElementRect() → Rect
module:minimap/utils~getDomElementRect
protected
TODO
Returns
-
getPageStyles() → Array.<(String | Object)>
module:minimap/utils~getPageStyles
protected
Harvests all web page styles, for instance, to allow re-using them in an
<iframe>
preserving the look of the content.The returned data format is as follows:
[ 'p { color: red; ... } h2 { font-size: 2em; ... } ...', '.spacing { padding: 1em; ... }; ...', '...', { href: 'http://link.to.external.stylesheet' }, { href: '...' } ]
Note: For stylesheets with
href
different than window origin, an object is returned because accessing rules of these styles may cause CORS errors (depending on the configuration of the web page).Returns
Array.<(String | Object)>
-
getScrollable() → HTMLElement
module:minimap/utils~getScrollable
protected
TODO
Returns
HTMLElement
Every day, we work hard to keep our documentation complete. Have you spotted an outdated information? Is something missing? Please report it via our issue tracker.