It looks to be an issue on plugin.js, in order to disable the embed buttons on source view.

It is missing the modes on the "addButton".
modes: { wysiwyg : 1, source : 0 },

Fixed version:
editor.ui.addButton(button.id, {
label: button.label,
data: button,
allowedContent: 'drupal-entity[!data-entity-type,!data-entity-uuid,!data-entity-embed-display,!data-entity-embed-display-settings,!data-align,!data-caption,!data-embed-button]',
click: function(editor) {
editor.execCommand('editdrupalentity', this.data);
},
icon: button.image,
modes: { wysiwyg : 1, source : 0 },

How can I send a PR to fix this?

Thanks,

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

juanl created an issue. See original summary.

juanl’s picture

Assigned: juanl » Unassigned
juanl’s picture

juanl’s picture

Fix attached, please can someone apply it? Thanks! :)

marcoscano’s picture

Version: 8.x-1.0-alpha1 » 8.x-1.x-dev
Component: Code » CKEditor integration
Status: Active » Needs review
Issue tags: -source, -mode +D8Media

Status: Needs review » Needs work

The last submitted patch, 3: Bottons don't gray out on source mode-2847116-1.patch, failed testing.

marcoscano’s picture

Status: Needs work » Needs review
FileSize
478 bytes

Re-roll of #3

juanl’s picture

Status: Needs review » Reviewed & tested by the community
Wim Leers’s picture

Title: Bottons don't gray out on source mode » Buttons don't become disabled (grayed out) while in source mode
Priority: Normal » Major
Issue tags: -D8Media +Media Initiative, +JavaScript

Thanks! 👌

  • Wim Leers committed 80c9e1c on 8.x-1.x authored by marcoscano
    Issue #2847116 by marcoscano: Buttons don't become disabled (grayed out...
Wim Leers’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.