diff --git a/README.md b/README.md index 56d1a71..42dfbac 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Entity Embed can be installed via the [standard Drupal installation process](htt * Go to the 'Text formats and editors' configuration page: `/admin/config/content/formats`, and for each text format/editor combo where you want to embed entities, do the following: * Enable the 'Display embedded entities' filter. * Drag and drop the 'E' button into the Active toolbar. - * If the text format uses the 'Limit allowed HTML tags and correct faulty HTML' filter, ensure the necessary tags and attributes are whitelisted: add `````` to the 'Allowed HTML tags' setting. (Will happen automatically after https://www.drupal.org/node/2554687.) + * If the text format uses the 'Limit allowed HTML tags and correct faulty HTML' filter, ensure the necessary tags and attributes are whitelisted: add `````` to the 'Allowed HTML tags' setting. (Will happen automatically after https://www.drupal.org/node/2554687.) ## Usage diff --git a/js/plugins/drupalentity/plugin.js b/js/plugins/drupalentity/plugin.js index 6c76bf8..4f27940 100644 --- a/js/plugins/drupalentity/plugin.js +++ b/js/plugins/drupalentity/plugin.js @@ -27,7 +27,7 @@ // Generic command for adding/editing entities of all types. editor.addCommand('editdrupalentity', { - allowedContent: 'drupal-entity[data-entity-type,data-entity-uuid,data-entity-embed-display,data-entity-embed-settings]', + allowedContent: 'drupal-entity[data-entity-*]', requiredContent: 'drupal-entity[data-entity-type,data-entity-uuid,data-entity-embed-display,data-entity-embed-settings]', modes: { wysiwyg : 1 }, canUndo: true, @@ -83,8 +83,8 @@ // Register the entity embed widget. editor.widgets.add('drupalentity', { // Minimum HTML which is required by this widget to work. - allowedContent: 'drupal-entity[*]', - requiredContent: 'drupal-entity[*]', + allowedContent: 'drupal-entity[data-entity-*]', + requiredContent: 'drupal-entity[data-entity-type,data-entity-uuid,data-entity-embed-display,data-entity-embed-settings]', // Simply recognize the element as our own. The inner markup if fetched // and inserted the init() callback, since it requires the actual DOM