1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-07-20 05:39:41 +02:00

New tools added + code highlighting (#12)

This commit is contained in:
Peter Savchenko 2018-10-20 17:54:15 +03:00 committed by GitHub
parent f845a0d09f
commit 262c1614ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 1510 additions and 1508 deletions

View file

@ -0,0 +1,36 @@
/**
* @typedef {object} pageModuleSettings
*/
/**
* @class Page
* @classdesc Class for page module
*/
export default class Writing {
/**
* Creates base properties
*/
constructor() {
this.codeStyler = null;
}
/**
* Called by ModuleDispatcher to initialize module from DOM
* @param {pageModuleSettings} settings - module settings
* @param {HTMLElement} moduleEl - module element
*/
init(settings = {}, moduleEl) {
this.codeStyler = this.createCodeStyling();
};
/**
* Init code highlighting
*/
async createCodeStyling() {
const {default: CodeStyler} = await import(/* webpackChunkName: "code-styling" */ './../classes/codeStyler');
return new CodeStyler({
selector: '.block-code',
});
};
}