All Projects → luwes → craft3-codemirror

luwes / craft3-codemirror

Licence: MIT License
Add the awesome in-browser code editor CodeMirror as a field type.

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects
PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to craft3-codemirror

query
Run SQL queries as an admin from the Craft CMS control panel.
Stars: ✭ 14 (-17.65%)
Mutual labels:  craftcms, craft-plugin
picpuller-for-craft3
Pic Puller for Craft 3 lets authorized users pull in their Instagram media into Craft.
Stars: ✭ 12 (-29.41%)
Mutual labels:  craftcms, craft-plugin
craft-plugin-patrol
Patrol for Craft 3
Stars: ✭ 28 (+64.71%)
Mutual labels:  craftcms, craft-plugin
colorit
A slick color picker fieldtype plugin for the Craft CMS 3 control panel
Stars: ✭ 18 (+5.88%)
Mutual labels:  craftcms, fieldtype
richvariables
DEPRECATED Allows you to easily use Craft Globals as variables in Rich Text fields
Stars: ✭ 44 (+158.82%)
Mutual labels:  craftcms, craft-plugin
fastcgicachebust
DEPRECATED Bust the Nginx FastCGI Cache when entries are saved or created.
Stars: ✭ 20 (+17.65%)
Mutual labels:  craftcms, craft-plugin
mailgun
Mailgun mailer adapter for Craft CMS.
Stars: ✭ 27 (+58.82%)
Mutual labels:  craftcms, craft-plugin
seomate
SEO, mate! It's important. That's why SEOMate provides the tools you need to craft all the meta tags, sitemaps and JSON-LD microdata you need - in one highly configurable, open and friendly package - with a super-light footprint.
Stars: ✭ 31 (+82.35%)
Mutual labels:  craftcms, craft-plugin
craft-routemap
Returns a list of Craft/Vue/React route rules and element URLs for ServiceWorkers from Craft entries
Stars: ✭ 30 (+76.47%)
Mutual labels:  craftcms, craft-plugin
craft-guide
A CMS Guide for Craft CMS.
Stars: ✭ 62 (+264.71%)
Mutual labels:  craftcms, craft-plugin
disclosedassets
DEPRECATED Allow your clients to find asset sub-folders by disclosing them by default
Stars: ✭ 13 (-23.53%)
Mutual labels:  craftcms, craft-plugin
craft-instagram-feed
Craft CMS plugin to receive Instragram feed data as variable in templates
Stars: ✭ 25 (+47.06%)
Mutual labels:  craftcms, craft-plugin
snipcart-craft-plugin
Craft e-commerce in a day.
Stars: ✭ 20 (+17.65%)
Mutual labels:  craftcms, craft-plugin
craft-connect
Allows you to connect to external databases and perform db queries
Stars: ✭ 16 (-5.88%)
Mutual labels:  craftcms, craft-plugin
SecureAssetDownload
Craft CMS plugin for secure asset download URLs
Stars: ✭ 22 (+29.41%)
Mutual labels:  craftcms, craft-plugin
craft.patrol
Patrol simplifies SSL and maintenance routing for sites built with Craft
Stars: ✭ 90 (+429.41%)
Mutual labels:  craftcms, craft-plugin
contact-form-honeypot
Add a honeypot captcha to your Craft CMS contact form.
Stars: ✭ 24 (+41.18%)
Mutual labels:  craftcms, craft-plugin
craft-json-snippets
Helps make CraftCMS models in .json
Stars: ✭ 17 (+0%)
Mutual labels:  craftcms, craft-plugin
linkit
Linkit Plugin for Craft 3
Stars: ✭ 25 (+47.06%)
Mutual labels:  craftcms, fieldtype
craft-webperf
Webperf helps you build & maintain high quality websites through Real User Measurement of your website's performance
Stars: ✭ 24 (+41.18%)
Mutual labels:  craftcms, craft-plugin

CodeMirror plugin for Craft CMS 3.x

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

Screenshot

Installation

To install CodeMirror, follow these steps:

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

CodeMirror works on Craft 3.x.

CodeMirror Overview

https://github.com/codemirror/codemirror

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.

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
    ]
];

Brought to you by Wesley Luyten

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].