diff --git a/services/web/app/views/project/editor.pug b/services/web/app/views/project/editor.pug index 13939ee5d6..58c56bdce8 100644 --- a/services/web/app/views/project/editor.pug +++ b/services/web/app/views/project/editor.pug @@ -158,6 +158,12 @@ block requirejs window.pdfCMapsPath = "#{pdfCMapsPath}" window.uiConfig = JSON.parse('!{JSON.stringify(uiConfig).replace(/\//g, "\\/")}'); + // TODO: inject based on environment + script( + src="http://localhost:3809/public/js/es/richText.js" + type="text/javascript" + ) + script( data-main=buildJsPath("ide.js", {hashedPath:false}), baseurl=fullJsPath, diff --git a/services/web/public/es/rich-text.js b/services/web/public/es/rich-text.js index 0b7ef955ad..b07155829d 100644 --- a/services/web/public/es/rich-text.js +++ b/services/web/public/es/rich-text.js @@ -1 +1,5 @@ -console.log('hello from rich text') +import CodeMirror from 'codemirror' + +export function init(rootEl) { + return CodeMirror(rootEl) +} diff --git a/services/web/webpack.config.js b/services/web/webpack.config.js index 78e21f4982..b9474cffac 100644 --- a/services/web/webpack.config.js +++ b/services/web/webpack.config.js @@ -4,7 +4,7 @@ module.exports = { // Defines the "entry point(s)" for the application - i.e. the file which // bootstraps the application entry: { - 'rich-text': './public/es/rich-text.js' + richText: './public/es/rich-text.js' }, // Define where and how the bundle will be output to disk