2017 © Pedro Peláez
 

craft-plugin craft3-codemirror

Add the awesome in-browser code editor CodeMirror as a field type.

image

luwes/craft3-codemirror

Add the awesome in-browser code editor CodeMirror as a field type.

  • Wednesday, December 13, 2017
  • by luwes
  • Repository
  • 2 Watchers
  • 6 Stars
  • 284 Installations
  • JavaScript
  • 1 Dependents
  • 0 Suggesters
  • 5 Forks
  • 4 Open issues
  • 3 Versions
  • 35 % Grown

The README.md

CodeMirror plugin for Craft CMS

Add the awesome in-browser code editor CodeMirror as a field type., (*1)

Screenshot, (*2)

Installation

To install CodeMirror, follow these steps:, (*3)

  1. Install with Composer via composer require luwes/craft-codemirror
  2. Install plugin in the Craft Control Panel under Settings > Plugins

CodeMirror works on Craft 3.x and 4.x., (*4)

CodeMirror Overview

https://github.com/codemirror/codemirror, (*5)

Configuring CodeMirror

Copy the code below, create a file named code-mirror.php and place it in the craft config folder to override the default options., (*6)

php return [ 'jsOptions' => [ 'theme' => 'default', 'lineNumbers' => true, 'lineWrapping' => true, 'viewportMargin' => new JsExpression('Infinity'), ], 'modes' => [ 'gfm', // the first mode is enabled by default 'markdown', 'htmlmixed', 'javascript', 'css', 'xml', ], 'addons' => [ 'mode/overlay', // needed for gfm (github flavored) mode ] ];, (*7)

Brought to you by Wesley Luyten, (*8)

The Versions

13/12 2017

dev-master

9999999-dev

Add the awesome in-browser code editor CodeMirror as a field type.

  Sources   Download

MIT

The Requires

 

cms codemirror craftcms craft-plugin craft

26/11 2017

1.0.0

1.0.0.0

Add the awesome in-browser code editor CodeMirror as a field type.

  Sources   Download

MIT

The Requires

 

cms codemirror craftcms craft-plugin craft

10/08 2017

2.0.0

2.0.0.0

Add the awesome in-browser code editor CodeMirror as a field type.

  Sources   Download

MIT

The Requires

 

cms codemirror craftcms craft-plugin craft