Welcome to mirror list, hosted at ThFree Co, Russian Federation.

index.js « js - github.com/nextcloud/files_texteditor.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a8e96e3c2010c6dab801c88c14f63786ffda32f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/**
 * ownCloud - Files_Texteditor
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author Tom Needham <tom@owncloud.com>
 * @copyright Tom Needham 2015
 */

import {SidebarPreview} from './sidebarpreview';
import {Texteditor} from './editor';
import {newFileMenuPlugin} from './newfileplugin';

// convince webpack to load chunks
__webpack_require__.p = OC.filePath('files_texteditor', 'js', '../build/');
const script = document.querySelector('[nonce]');
__webpack_require__.nc = script['nonce'] || script.getAttribute('nonce');

OCA.Files_Texteditor = Texteditor;

OC.Plugins.register('OCA.Files.NewFileMenu', newFileMenuPlugin);
OC.Plugins.register('OCA.Files.SidebarPreviewManager', new SidebarPreview());

$(document).ready(function () {
	$('#editor').remove();
	OCA.Files_Texteditor.initialize($('<div id="app-content-texteditor"></div>'));
});