gulf-editor-codemirror
v5.0.1
Published
Convenient gulf wrapper for codemirror (uses shareaJS's textOT)
Downloads
10
Maintainers
Readme
gulf-editor-codemirror
Gulf bindings for codemirror
(This version is compatible with gulf v5, only. For gulf v4 see the package gulf-codemirror
on npm)
Install
npm install --save gulf-editor-codemirror
Usage
const CodemirrorDocument = require('gulf-editor-codemirror')
var cm = CodeMirror(document.body)
var doc = new CodemirrorDocument({
editorInstance: cm
})
masterStream.pipe(doc.masterLink()).pipe(masterStream)
API
class CodemirrorDocument({editorInstance:CodeMirror, ...}) extends gulf.EditableDocument
editorInstance
-- a codemirror instance to be wired up with gulfstorageAdapter
-- (optional) a gulf storage adapter. Default isgulf.MemoryAdapter
ottype
-- (optional) the ottype to use. Default isot-text
.
Legal
(c) 2015-2016 by Marcel Klehr
GNU Lesser General Public License