egorlaw/ckeditor_codemirror 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

egorlaw/ckeditor_codemirror

最新稳定版本:2.0.0

Composer 安装命令:

composer require egorlaw/ckeditor_codemirror

包简介

Composer wrapper for CKEditor Codemirror plugin

README 文档

README

This is a mere copy of the CKEditor Codemirror made for the only purpose to serve it via $ composer install on Packagist.org

All the issues and the questions sould be referred on the original developer.

Notes about install

Inside your drupal project's composer.json there's a little hack that needs to be applied, as there's a problem with installation. You'll write down something like:

"require": {
  ...
  "drupal/ckeditor_codemirror": "^1.1",
  "egorlaw/ckeditor_codemirror": "^1.0",
  ...
},
"extras": {
  "installer-paths": {
    "web/core": ["type:drupal-core"],
    "web/libraries/{$name}": ["type:drupal-library"],
    "web/modules/contrib/{$name}": ["type:drupal-module"],
    "web/profiles/contrib/{$name}": ["type:drupal-profile"],
    "web/themes/contrib/{$name}": ["type:drupal-theme"],
  }
}

The $ composer install comand will do everything quite correct and will place the codemirror plugin inside your library folder as ckeditor_codemirror. There's a little problem with that: The contrib module ckeditor_codemirror is looking into another path: library/ckeditor.codemirror/plugin.js and unfortunatly it's hardcoded. So to avoid patching the module just make sure to rename the folder during the $ composer install by adding this row inside extras.installer-paths:

"web/libraries/ckeditor.codemirror": ["egorlaw/ckeditor_codemirror"],

BEFORE the "web/libraries/{$name}": ["type:drupal-library"], row! Resulting in :

"extras": {
  "installer-paths": {
    "web/core": ["type:drupal-core"],
    "web/libraries/ckeditor.codemirror": ["egorlaw/ckeditor_codemirror"],   <-- here
    "web/libraries/{$name}": ["type:drupal-library"],
    "web/modules/contrib/{$name}": ["type:drupal-module"],
    "web/profiles/contrib/{$name}": ["type:drupal-profile"],
    "web/themes/contrib/{$name}": ["type:drupal-theme"],
  }
}

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-11-15