UNPKG

substance

Version:

Substance is a JavaScript library for web-based content editing. It provides building blocks for realizing custom text editors and web-based publishing systems.

13 lines (12 loc) 349 B
import { DefaultDOMElement, platform } from 'substance' export default function getMountPoint(t) { let mountPoint if (platform.inBrowser) { mountPoint = t.sandbox } else { let htmlDoc = DefaultDOMElement.createDocument('html') mountPoint = htmlDoc.createElement('div') htmlDoc.appendChild(mountPoint) } return mountPoint }