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

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.