mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-07-21 06:09:41 +02:00
Integrate CodeXEditor: dynamic import added (#5)
* Main elements created * Add Editor to the writing page
This commit is contained in:
parent
4326cb22ab
commit
e7e64cea3e
21 changed files with 15676 additions and 820 deletions
|
@ -2,11 +2,42 @@
|
|||
// eslint-disable-next-line no-unused-vars
|
||||
import css from '../styles/main.pcss';
|
||||
|
||||
module.exports = class Docs {
|
||||
/**
|
||||
* Module Dispatcher
|
||||
* @see {@link https://github.com/codex-team/moduleDispatcher}
|
||||
* @author CodeX
|
||||
*/
|
||||
import ModuleDispatcher from 'module-dispatcher';
|
||||
|
||||
/**
|
||||
* Import modules
|
||||
*/
|
||||
import Writing from './modules/writing';
|
||||
|
||||
/**
|
||||
* Main app class
|
||||
*/
|
||||
class Docs {
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
constructor() {
|
||||
console.log('CodeX Docs initialized');
|
||||
this.writing = new Writing();
|
||||
|
||||
document.addEventListener('DOMContentLoaded', (event) => {
|
||||
this.docReady();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Document is ready
|
||||
*/
|
||||
docReady() {
|
||||
this.moduleDispatcher = new ModuleDispatcher({
|
||||
Library: window.Docs
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = new Docs();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue