# j-CodeMirror

> j-CodeMirror: supports multiple cursors (shift + cmd + arrow-down/up); supports finding selected text (cmd + d)

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: en
Content-SHA256: 14caca6469063f506170b25f135534f1bee7d131f3e93b4a49e1684f29b9acb7
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

- supports multiple cursors (`shift + cmd + arrow-down/up`)
- supports finding selected text (`cmd + d`)
- supports custom scrollbars

__Configuration__:

- `type {String}` type for syntax highlighting (default: `htmlmixed`)
- `required {Boolean}` enables "required" (default: `false`)
- `linenumbers {Boolean}` shows line numbers (default: `false`)
- `icon {String}` icon for label without `fa-` e.g. `home`, `cog`, etc.
- `height {Number}` control height (default: `200` px)
- `label {String}` label (default is HTML content)
- `disabled {Boolean}` disables this component
- `tabs {Boolean}` enables indent with tabs (default: `false`)
- `trim {Boolean}` performs auto-trim and removes empty begin/end lines (default: `false`)
- `parent {String}` can set height by parent element
- `margin {Number}` a margin for height
- `minheight {Number}` a minimal height for `parent` option (default: `200`)

__Method__:

- `component.insert('some text')` inserts a text to the current position of the cursor

Use it with `<ui-component name="codemirror">`. 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.

```html example.html
<div style="width:500px">
	<ui-component name="codemirror" path="html" config="type:htmlmixed;required:true;height:200">HTML editor</ui-component>
</div>

<script>
	var html = '<h1>HELLO WORLD</h1>';
</script>
```
