1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | 'use strict';
|
12 |
|
13 | var invariant = require("fbjs/lib/invariant");
|
14 |
|
15 | var isHTMLElement = require("./isHTMLElement");
|
16 |
|
17 | function getContentEditableContainer(editor) {
|
18 | var editorNode = editor.editorContainer;
|
19 | !editorNode ? process.env.NODE_ENV !== "production" ? invariant(false, 'Missing editorNode') : invariant(false) : void 0;
|
20 | !isHTMLElement(editorNode.firstChild) ? process.env.NODE_ENV !== "production" ? invariant(false, 'editorNode.firstChild is not an HTMLElement') : invariant(false) : void 0;
|
21 | var htmlElement = editorNode.firstChild;
|
22 | return htmlElement;
|
23 | }
|
24 |
|
25 | module.exports = getContentEditableContainer; |
\ | No newline at end of file |