Adding Embed button to CKEditor
Here is how you add Entity Embeds to the CKEditor.
First, download Entity Embed module with composer and install it with Drupal console:
composer require drupal/entity_embed
drupal module:install entity_embed
Next you need to add your Text editor embed button, by going here: /admin/config/content/embed Configure the button as Media type, and, based on what you are using the embed button for, check the appropriate Allowed Entity Embed Display Plugins. Also, add another icon for the button, or you will have the default E, which is also used for embedding nodes.
Now you go to here: /admin/config/content/formats/manage/basic_html , to add the button to the Basic HTML text format. The Embed buttons are now available, and you can drag them to the Active toolbar (remember to remove the image embed button, that used to be there).
Also, remember to check the Display embedded entities, so that the images actually show up in the editor. And finally, Drag Display embedded entities above Allign images and Caption images Filters (in the Filters processing order).
Finally, you'll have to de-select the "Restrict images to this site" selection.
You can also watch this Webinar for more info. The part I cover here starts at 20:02: https://youtu.be/-geQaiQdN_w?t=20m2s
Add new comment