Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CKEditor local config.js #3162

Closed
strangerxx opened this issue Jul 4, 2019 · 7 comments
Closed

CKEditor local config.js #3162

strangerxx opened this issue Jul 4, 2019 · 7 comments

Comments

@strangerxx
Copy link

How overwrite config.js for CKEditor from local and don`t load from cdn?

@mshibuya
Copy link
Member

mshibuya commented Jul 6, 2019

What did you try and what happened?

@strangerxx
Copy link
Author

strangerxx commented Jul 6, 2019

I overwrite config.js for CKEditor from local storage, but include default config from cdn. Sorry, my english is bad.

@mshibuya
Copy link
Member

mshibuya commented Jul 6, 2019

Paste actual code, please.

@strangerxx
Copy link
Author

I add file in app/assets/javascripts/ckeditor/config.js
CKEDITOR.editorConfig = function( config ) { // Define changes to default configuration here. For example: config.language = 'fr'; config.uiColor = '#AADC6E'; };
but include cdn config

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/ckeditor/4.11.4/config.js?t=J39A"></script><link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/ckeditor/4.11.4/skins/moono-lisa/editor.css?t=J39A"><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/ckeditor/4.11.4/lang/ru.js?t=J39A"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/ckeditor/4.11.4/styles.js?t=J39A"></script><link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/ckeditor/4.11.4/plugins/scayt/skins/moono-lisa/scayt.css?t=J39A"><link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/ckeditor/4.11.4/plugins/scayt/dialogs/dialog.css?t=J39A"><link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/ckeditor/4.11.4/plugins/tableselection/styles/tableselection.css"><link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/ckeditor/4.11.4/plugins/wsc/skins/moono-lisa/wsc.css?t=J39A"><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/ckeditor/4.11.4/plugins/image/dialogs/image.js?t=J39A"></script><link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/ckeditor/4.11.4/skins/moono-lisa/dialog.css?t=J39A">
and
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/ckeditor/4.11.4/config.js?t=J39A"></script>
overwrite my config.

@mshibuya
Copy link
Member

mshibuya commented Aug 3, 2019

There was a glitch in passing custom config location to CKEditor. I've fixed it in the master and added an instruction in the Wiki.

@strangerxx
Copy link
Author

Thank you

@seanwmitchell
Copy link

Thanks, this worked perfectly with rails 6.0.2.1, ruby 2.6.3, ckeditor gem 5.0.0 and rails_admin 2.0.1

I can use the assets/ckeditor/config.js file perfectly.

My issue was that the upload to server options in the image button of CKeditor weren't showing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants