Load basic CM instance with dummy content

This commit is contained in:
Alasdair Smith 2018-01-16 17:51:30 +00:00
parent d8e87997c1
commit f5b6d3ff3e
3 changed files with 12 additions and 2 deletions

View file

@ -158,6 +158,12 @@ block requirejs
window.pdfCMapsPath = "#{pdfCMapsPath}" window.pdfCMapsPath = "#{pdfCMapsPath}"
window.uiConfig = JSON.parse('!{JSON.stringify(uiConfig).replace(/\//g, "\\/")}'); 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( script(
data-main=buildJsPath("ide.js", {hashedPath:false}), data-main=buildJsPath("ide.js", {hashedPath:false}),
baseurl=fullJsPath, baseurl=fullJsPath,

View file

@ -1 +1,5 @@
console.log('hello from rich text') import CodeMirror from 'codemirror'
export function init(rootEl) {
return CodeMirror(rootEl)
}

View file

@ -4,7 +4,7 @@ module.exports = {
// Defines the "entry point(s)" for the application - i.e. the file which // Defines the "entry point(s)" for the application - i.e. the file which
// bootstraps the application // bootstraps the application
entry: { 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 // Define where and how the bundle will be output to disk