1.0.2 • Published 7 years ago

codemirror-no-newlines v1.0.2

Weekly downloads
71
License
MIT
Repository
github
Last release
7 years ago

No Newlines CodeMirror addon

Add a configuration option to CodeMirror called "noNewlines" that when set as true will prevent any newline characters from being typed into the CodeMirror editor and any newline character pasted into the editor will be replaced by a single space.

Usage

var myCodeMirror = CodeMirror(document.body, {
  value:      "function myScript(){return 100;}\n",
  mode:       "javascript",
  noNewlines: true
});

Attribution

Significant inspiration from https://discuss.codemirror.net/t/single-line-codemirror/195/4

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago