This Polymer element wraps the CodeMirror text editor.
Add this to your package's pubspec.yaml file:
dependencies:
codemirror_element: anyYou can install packages from the command line:
$ pub getImport Custom Element:
<linkrel="import" href="packages/codemirror_element/codemirror.html">Start using it!
<code-mirror></code-mirror>| Attribute | Options | Default | Description |
|---|---|---|---|
value | string | The value of the editor. | |
mode | string | The mode to use. | |
theme | string | The theme to style the editor with. | |
lineNumbers | bool | false | Whether to show line numbers to the left of the editor. |
indentWithTabs | bool | false | Whether, when indenting, the first N*tabSize spaces should be replaced by N tabs. |
autoCloseTags | bool | false | Defines an autoCloseTags option that will auto-close XML tags when '>' or '/' is typed. |
| Method | Parameters | Returns | Description |
|---|---|---|---|
focus() | None. | Nothing. | Give the editor focus. |
refresh() | None. | Nothing. | Ensure CodeMirror is still looking as intended. |
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -m 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request :D
For detailed changelog, check CHANGELOG.
