codemirror 1.1.1

Externs for CodeMirror js library.

Released 2016-12-16.

To install, run:

haxelib install codemirror 1.1.1

See using Haxelib in Haxelib documentation for more information.

Maintaineryar3333
Websitehttps://bitbucket.org/yar3333/haxe-codemirror
Current version1.1.1
StatisticsInstalled 246 times
LicenseMIT
Tags

README.md

codemirror haxe library

Externs for CodeMirror (js-based text editor).

Example

HTML:

<!DOCTYPE html>
<html>
	<head>
		<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.13.2/codemirror.css">
		<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.13.2/codemirror.js"></script>
		<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.13.2/mode/javascript/javascript.js"></script>
	</head>
	<body>
		<script src="bin/test.js"></script>
	</body>
<html>

Haxe:

import js.Browser;
import js.codemirror.*;

class Main
{
    static function main()
	{
		var cm = new CodeMirror(Browser.document.body,
		{
			value: "function myScript() { return 100; }\n",
			mode:  "javascript"
		});
	}
}