承接 luwes/craft-codemirror 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

luwes/craft-codemirror

最新稳定版本:2.0.0

Composer 安装命令:

composer require luwes/craft-codemirror

包简介

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

README 文档

README

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/craft-codemirror
  2. Install plugin in the Craft Control Panel under Settings > Plugins

CodeMirror works on Craft 3.x and 4.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

统计信息

  • 总下载量: 9.61k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 18
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 18
  • Watchers: 3
  • Forks: 10
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-08-22