{"id":15662391,"url":"https://github.com/luwes/craft-codemirror","last_synced_at":"2025-04-15T11:52:42.526Z","repository":{"id":19155746,"uuid":"84906109","full_name":"luwes/craft-codemirror","owner":"luwes","description":"Add the awesome in-browser code editor CodeMirror as a field type.","archived":false,"fork":false,"pushed_at":"2022-09-24T14:26:45.000Z","size":1000,"stargazers_count":18,"open_issues_count":11,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-28T19:44:57.705Z","etag":null,"topics":["codemirror","craft-plugin","craftcms","fieldtype"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luwes.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-14T04:39:23.000Z","updated_at":"2023-03-07T13:24:48.000Z","dependencies_parsed_at":"2022-09-04T09:50:43.168Z","dependency_job_id":null,"html_url":"https://github.com/luwes/craft-codemirror","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luwes%2Fcraft-codemirror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luwes%2Fcraft-codemirror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luwes%2Fcraft-codemirror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luwes%2Fcraft-codemirror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luwes","download_url":"https://codeload.github.com/luwes/craft-codemirror/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248654029,"owners_count":21140235,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["codemirror","craft-plugin","craftcms","fieldtype"],"created_at":"2024-10-03T13:32:17.788Z","updated_at":"2025-04-15T11:52:42.502Z","avatar_url":"https://github.com/luwes.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CodeMirror plugin for Craft CMS\n\nAdd the awesome in-browser code editor CodeMirror as a field type.\n\n![Screenshot](resources/img/codemirror-screenshot.png)\n\n## Installation\n\nTo install CodeMirror, follow these steps:\n\n1. Install with Composer via `composer require luwes/craft-codemirror`\n2. Install plugin in the Craft Control Panel under Settings \u003e Plugins\n\nCodeMirror works on Craft 3.x and 4.x.\n\n## CodeMirror Overview\n\nhttps://github.com/codemirror/codemirror\n\n## Configuring CodeMirror\n\nCopy the code below, create a file named `code-mirror.php` and place it in the craft config folder to override the default options.\n\n``` php\nreturn [\n    'jsOptions' =\u003e [\n        'theme' =\u003e 'default',\n        'lineNumbers' =\u003e true,\n        'lineWrapping' =\u003e true,\n        'viewportMargin' =\u003e new JsExpression('Infinity'),\n    ],\n    'modes' =\u003e [\n        'gfm', // the first mode is enabled by default\n        'markdown',\n        'htmlmixed',\n        'javascript',\n        'css',\n        'xml',\n    ],\n    'addons' =\u003e [\n        'mode/overlay', // needed for gfm (github flavored) mode\n    ]\n];\n```\n\nBrought to you by [Wesley Luyten](https://wesleyluyten.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluwes%2Fcraft-codemirror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluwes%2Fcraft-codemirror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluwes%2Fcraft-codemirror/lists"}