Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In Drupal 7 - we added config.startup Mode = 'source'; to the JS field to startup a CKeditor in Source mode - - how do I accomplish that in Drupal 8?
Comment | File | Size | Author |
---|---|---|---|
#8 | Screen Shot 2018-03-29 at 11.41.37 AM.png | 117.83 KB | ThoreauinSF |
Comments
Comment #2
ThoreauinSF CreditAttribution: ThoreauinSF commentedAny response to this query please?
Comment #3
wellsIt looks like hook_editor_js_settings_alter is what you need to check out for changing CKEditor's config options. This is a global CKEditor config so I am hesitant to include an option for it in this module.
Comment #5
wellsOn second thought, I like this idea and have added in to 8.x-1.x-dev. Please give it a try and let me know if it works.
Comment #7
wellsComment #8
ThoreauinSF CreditAttribution: ThoreauinSF commented@wells - thanks for adding this - however - when I turn it on - it renders all my text fields invisible.
is there a cache clear that I missed somewhere that will make these present?
Comment #9
wells@rmcdiarmid - Sorry about that! I marked this fixed and was going to publish a 2.0 release with the dev branch but haven't had the time to get it done.
There are some breaking changes on the dev branch as we removed the Libraries API dependency. The easiest way to update is likely to just redownload the CKEditor CodeMirror library and place it in the root /libraries folder of your Drupal installation. Here are the notes from the updated README (note particularly that the basis is now the full library from GH, not just the "codemirror" sub-folder):
Comment #10
ThoreauinSF CreditAttribution: ThoreauinSF commentedty - I figured that out as well :) So awesome - thank you for doing this.