RichText/Archived/Rooster/Rooster.gcomp/Support/node_modules/roosterjs/dist/rooster-amd.js
/**
 * Create core object for editor
 * @param contentDiv The DIV element used for editor
 * @param options Options to create an editor
 */
Create core object for editor
@param contentDiv The DIV element used for editor
@param options Options to create an editor
Create core object for editor @param contentDiv The DIV element used for editor @param options Options to create an editor
function createEditorCore(contentDiv, options) {
    var corePlugins = {
        undo: options.undo || new Undo_1.default(),
        edit: new EditPlugin_1.default(),
        typeInContainer: new TypeInContainerPlugin_1.default(),
        mouseUp: new MouseUpPlugin_1.default(),
        domEvent: new DOMEventPlugin_1.default(options.disableRestoreSelectionOnFocus),
        firefoxTypeAfterLink: roosterjs_editor_dom_1.Browser.isFirefox && new FirefoxTypeAfterLink_1.default(),
        copyPlugin: !roosterjs_editor_dom_1.Browser.isIE && new CopyPlugin_1.default(),
    };
    var allPlugins = buildPluginList(corePlugins, options.plugins);
    var eventHandlerPlugins = allPlugins.filter(function (plugin) { return plugin.onPluginEvent || plugin.willHandleEventExclusively; });
    return {
        contentDiv: contentDiv,
        scrollContainer: options.scrollContainer || contentDiv,
        document: contentDiv.ownerDocument,
        defaultFormat: calculateDefaultFormat_1.calculateDefaultFormat(contentDiv, options.defaultFormat, options.inDarkMode),
        corePlugins: corePlugins,
        currentUndoSnapshot: null,
        customData: createCustomData(options.customData || {}),
        cachedSelectionRange: null,
        plugins: allPlugins,
        eventHandlerPlugins: eventHandlerPlugins,
        api: createCoreApiMap(options.coreApiOverride),
        defaultApi: createCoreApiMap(),
        inDarkMode: options.inDarkMode,
        darkModeOptions: options.darkModeOptions,
    };
}
function createEditorCore ( contentDiv , options ) { var corePlugins = { undo : options . undo || new Undo_1 . default ( ) , edit : new EditPlugin_1 . default ( ) , typeInContainer : new TypeInContainerPlugin_1 . default ( ) , mouseUp : new MouseUpPlugin_1 . default ( ) , domEvent : new DOMEventPlugin_1 . default ( options . disableRestoreSelectionOnFocus ) , firefoxTypeAfterLink : roosterjs_editor_dom_1 . Browser . isFirefox && new FirefoxTypeAfterLink_1 . default ( ) , copyPlugin : ! roosterjs_editor_dom_1 . Browser . isIE && new CopyPlugin_1 . default ( ) , } ; var allPlugins = buildPluginList ( corePlugins , options . plugins ) ; var eventHandlerPlugins = allPlugins . filter ( function ( plugin ) { return plugin . onPluginEvent || plugin . willHandleEventExclusively ; } ) ; return { contentDiv : contentDiv , scrollContainer : options . scrollContainer || contentDiv , document : contentDiv . ownerDocument , defaultFormat : calculateDefaultFormat_1 . calculateDefaultFormat ( contentDiv , options . defaultFormat , options . inDarkMode ) , corePlugins : corePlugins , currentUndoSnapshot : null , customData : createCustomData ( options . customData || { } ) , cachedSelectionRange : null , plugins : allPlugins , eventHandlerPlugins : eventHandlerPlugins , api : createCoreApiMap ( options . coreApiOverride ) , defaultApi : createCoreApiMap ( ) , inDarkMode : options . inDarkMode , darkModeOptions : options . darkModeOptions , } ; }
Create core object for editor
 @param contentDiv The DIV element used for editor
 @param options Options to create an editor
Create core object for editor @param contentDiv The DIV element used for editor @param options Options to create an editor