1.1.8 • Published 1 year ago

@vandeurenglenn/editor-fields v1.1.8

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

editor-field

Editor view using Monaco

install

npm i @vandeurenglenn/editor-fields

usage

<editor-fields></editor-fields>
import '@vandeurenglenn/editor-fields'
import theme from '@vandeurenglenn/editor-fields/vs-themes/palenight-italic.json' assert { type: 'json' }

const editorField = document.querySelector('editor-fields')

editorField.defineTheme('palenight-italic', theme)
editorField.setTheme('palenight-italic')
// editorField.setCompilerOptions()

// load models
editorField.createModel('my-thing.js', 'export default class MyThing { getThing () { return "theThing"}}', 'javascript')

await editorField.addField('thing.js', `import Thing from "./my-thing.js"
const thing = new Thing()`,
        'javascript')

await editorField.addField('index.html', '<html></html>', 'html')

await editorField.addField('index.css', 'html { display: block;}', 'css', 'vertical')

editorField.setModel('my-thing.js')
1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago