VikWeb.CodeMirror (Vik v0.0.1-rc1)

View Source

Fully-fledged CodeMirror editor with support for optional collaborative editing.

Summary

Functions

Renders a CodeMirror instance as a drop-in replacement for a HTML textarea.

Applies the provided Vik.Authority.Updates to the CodeMirror instance with the given ID.

Functions

codemirror(assigns)

Renders a CodeMirror instance as a drop-in replacement for a HTML textarea.

This component provides feature-parity with CoreComponents.input/1.

Attributes

  • id (:string)
  • name (:string)
  • value (:string)
  • field (Phoenix.FormField)
  • suid (:string) - Defaults to nil.
  • uid (:string) - Defaults to nil.
  • Global attributes are accepted.

sync(id, updates)

Applies the provided Vik.Authority.Updates to the CodeMirror instance with the given ID.