plastiq-ace-editor

A plastiq component that embeds the ace editor

Usage no npm install needed!

<script type="module">
  import plastiqAceEditor from 'https://cdn.skypack.dev/plastiq-ace-editor';
</script>

README

plastiq-ace-editor

A plastiq component that embeds the ace editor.

Demo

Example

var plastiq = require('plastiq');
var ace = require('plastiq-ace-editor');
var h = plastiq.html;

require('brace/mode/javascript');
require('brace/theme/monokai');

function render(model) {
  return h('.page',
    ace({
        binding: [model, 'code'],
        key: 'editor',
        theme: 'monokai',
        mode: 'javascript'
      },
      h('pre')
    ),
    h('textarea', { binding: [model, 'code'] })
  );
}

plastiq.append(document.body, render, { code: 'var x = 123;' });

License

MIT