[Solved] Problems in 8.2.1 with CKEditor Snippets?

Permalink 1 user found helpful
Hi @all,

I am currently working on the topic Snippets in the CKEditor.

For this, there were several examples in the tutorials and with GitHub how it should work.
I tried the tutorials and the examples of GitHub all in a blank installation of concrete5 version 8.2.1.


Everything with the same result: It does not work. The Snippets button does not appear in the menu bar. I have activated all toolbars in the backend settings, too.But nothing is displayed.

Is there a known problem / bug? Or are the examples outdated / not suitable for version 8.2.1?

Thank you for your assistance.

Best regards

1 Attachment

View Replies: View Best Answer
mnakalay replied on at Permalink Reply
Did you try to install the example from github directly? If yes, what was the result?
mnakalay replied on at Permalink Best Answer Reply
Actually, I have an answer to your question: it is a C5 bug.

Here's how to fix it:
Look for the file concrete\js\ckeditor4\core\concrete5styles\plugin.js

at line 106you will see the setting 'async': false commented out.

There is even some text the devs left there wondering if it was going to have an impact. Well yes it does, that setting needs to be put back in so the snippets show up in the editor.
MrKDilkington replied on at Permalink Reply

Nice catch, it looks like the code was changed here:

I am unsure about how to proceed with updating the tutorial. Since it would require a core file to be modified. I am not sure if the file can be overridden.
mnakalay replied on at Permalink Reply
@MrKDilkington I just pushed a pull requesthttps://github.com/concrete5/concrete5/pull/5897...

There's really no need for an Ajax call in this situation so I got rid of it. Now snippets are called directly from PHP and the editor loads faster.

And don't worry about your tutorial, you don't need to change it. What you explained in it is still the way to go, you can't include a hack to go around a core bug.

And when/if they accept my pull request, it will solve the problem and your tutorial will still be valid
LennDa replied on at Permalink Reply
many thanks for the quick reply and the pull-requsest.
I change this manually and wait for the response from the core team

mnakalay replied on at Permalink Reply
You're welcome