MCPcopy
hub / github.com/tinymce/tinymce / getEditorRect

Function getEditorRect

modules/tinymce/src/core/test/ts/browser/EditorViewTest.ts:12–20  ·  view source on GitHub ↗
(editor: Editor)

Source from the content-addressed store, hash-verified

10describe('browser.tinymce.core.EditorViewTest', () => {
11
12 const getEditorRect = (editor: Editor) => {
13 if (editor.inline) {
14 return editor.getBody().getBoundingClientRect();
15 } else {
16 return SelectorFind.descendant(TinyDom.contentAreaContainer(editor), 'iframe')
17 .map((elm) => elm.dom.getBoundingClientRect())
18 .getOrDie();
19 }
20 };
21
22 const setBodyStyles = (editor: Editor, css: Record<string, string>) => {
23 Css.setAll(TinyDom.body(editor), css);

Callers 1

assertIsXYInContentAreaFunction · 0.85

Calls 3

getBodyMethod · 0.80
getOrDieMethod · 0.80
mapMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…