codemirror 0.0.3+4.4.0 copy "codemirror: ^0.0.3+4.4.0" to clipboard
codemirror: ^0.0.3+4.4.0 copied to clipboard

outdatedDart 1 only

A Dart wrapper around the CodeMirror text editor.

codemirror.dart #

Build Status

What is it? #

A Dart wrapper around the CodeMirror text editor. From codemirror.net:

CodeMirror is a versatile text editor implemented in JavaScript for the browser. It is specialized for editing code, and comes with a number of language modes and addons that implement more advanced editing functionality.

An example #

Map options = {
  'mode':  'javascript',
  'theme': 'monokai'
};

CodeMirror editor = new CodeMirror.fromElement(
    querySelector('#textContainer'), options: options);
editor.setValue('foo.bar(1, 2, 3);');

How do I use it? #

In your main html file, link to the style sheet:

<link href="packages/codemirror/codemirror.css" rel="stylesheet">

reference the CodeMirror JavaScript code:

<script src="packages/codemirror/lib/codemirror.js"></script>

and, in your Dart code, import the library:

import 'package:codemirror/codemirror.dart';
15
likes
0
pub points
83%
popularity

Publisher

verified publishergoogle.dev

A Dart wrapper around the CodeMirror text editor.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

More

Packages that depend on codemirror