tsechingho / ckeditor-rails

Integrate CKEditor javascript library with Rails asset pipeline
https://github.com/tsechingho/ckeditor-rails
MIT License
214 stars 133 forks source link

config.js.coffee overridden by template config.js when placed in mounted engine #69

Open JakeTheSnake3p0 opened 8 years ago

JakeTheSnake3p0 commented 8 years ago

I wish to provide a default configuration inside my Rails engine that mounting apps can implicitly accept (by not writing any CKEDITOR js in their application). However with the absence of app/assets/javascripts/ckeditor/config.js in the mounting app, the following config.js file is served after the engine's config.js.coffee and effectively overwrites the method definition:

/**
 * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
 * For licensing, see LICENSE.md or http://ckeditor.com/license
 */

CKEDITOR.editorConfig = function( config ) {
    // Define changes to default configuration here. For example:
    // config.language = 'fr';
    // config.uiColor = '#AADC6E';
};

Here's a screencap of the network requests in the Inspector panel:

network-requests

prepsaKayastha commented 1 week ago

Hi @JakeTheSnake3p0 I'm facing the same issue. Were you able to resolve it?