Coder Social home page Coder Social logo

eglaw / ckeditor.codemirror Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 532 KB

This is a Wrapper for the Original plugin to be used by Composer's Packagist repo for Drupal8 library purpose

License: MIT License

CSS 10.18% JavaScript 83.56% HTML 6.25%

ckeditor.codemirror's Introduction

CKEditor Codemirror Plugin

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"],
  }
}

ckeditor.codemirror's People

Contributors

eglaw avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.