ForgeComponents
en

Components

j-MonacoEditor

jComponent 20 · jcomponent@20 component Example loaded with jComponent 20

The component renders Monaco editor.


Configuration:

  • theme {String} a default theme (default: vs-light)
  • language {String} language / mode (default: javascript)
  • height {Number} a default/minimal height (default: 200)
  • parent {String} optional, a container with fixed height, can be window (default value: auto)
  • margin {Number} optional, a top/bottom margin together (default: 0)

Use it with <ui-component name="monacoeditor">. When the component is not loaded yet, jComponent downloads it on first use from the address in DEF.fallback (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.

example.html
<ui-component name="monacoeditor" path="common.code" config="parent:window"></ui-component>

<script>

	var common = { code: 'var platform = "Total.js";'};

</script>