\<code-mirror\>

Build Status

This Polymer element wraps the CodeMirror text editor.

Demo

Check it live!

Install

Add this to your package's pubspec.yaml file:

dependencies:
  codemirror_element: any

You can install packages from the command line:

$ pub get

Usage

  1. Import Custom Element:
  <link rel="import" href="packages/codemirror_element/codemirror.html">
  1. Start using it!
  <code-mirror></code-mirror>

Options

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 NtabSize spaces should be replaced by N tabs. autoCloseTags | bool* | false | Defines an autoCloseTags option that will auto-close XML tags when '>' or '/' is typed.

Methods

Method | Parameters | Returns | Description --- | --- | --- | --- focus() | None. | Nothing. | Give the editor focus.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -m 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

History

For detailed changelog, check CHANGELOG.

License

BSD license

Libraries

codemirror