Loading core/modules/ckeditor5/js/build/drupalMedia.js +1 −1 File changed.Preview size limit exceeded, changes collapsed. Show changes core/modules/ckeditor5/js/ckeditor5_plugins/drupalMedia/src/drupallinkmedia/drupallinkmediaediting.js +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ function upcastMediaLink() { // There's an <drupal-media> inside an <a> element - we consume it so it // won't be picked up by the Link plugin. const consumableAttributes = { attributes: ['href'] }; const consumableAttributes = { attributes: ['href'], name: true }; // Consume the `href` attribute so the default one will not convert it to // $text attribute. Loading core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php +4 −10 Original line number Diff line number Diff line Loading @@ -791,16 +791,6 @@ public function testLinkability(bool $unrestricted) { // linking media. $this->assertNotEmpty($xpath->query('//a[@href="http://linking-embedded-media.com"]/drupal-media[@data-caption="baz"]')); // Remove caption from media for now to avoid incompatibility issues in GHS // linked media integration. // @todo remove this step after // https://www.drupal.org/project/drupal/issues/3268318 has been resolved. $this->assertNotEmpty($drupalmedia = $assert_session->waitForElementVisible('css', '.ck-content .ck-widget.drupal-media')); $drupalmedia->click(); $this->assertVisibleBalloon('.ck-toolbar[aria-label="Drupal Media toolbar"]'); $this->getBalloonButton('Toggle caption off')->click(); $this->assertTrue($assert_session->waitForElementRemoved('css', '.ck-content .ck-widget.drupal-media figcaption')); // Add `class="trusted"` to the link. $this->assertEmpty($xpath->query('//a[@href="http://linking-embedded-media.com" and @class="trusted"]')); $this->pressEditorButton('Source'); Loading Loading @@ -857,6 +847,10 @@ public function testLinkability(bool $unrestricted) { $assert_session->elementNotExists('css', '.ck-content a'); $assert_session->elementExists('css', '.ck-content .drupal-media.ck-widget > div[aria-label] > article > div > img[src*="image-test.png"]'); // Ensure that figcaption exists. // @see https://www.drupal.org/project/drupal/issues/3268318 $assert_session->elementExists('css', '.ck-content .drupal-media.ck-widget > figcaption'); // Assert the "dataDowncast" HTML after making changes. $xpath = new \DOMXPath($this->getEditorDataAsDom()); $this->assertNotEmpty($xpath->query('//drupal-media')); Loading Loading
core/modules/ckeditor5/js/build/drupalMedia.js +1 −1 File changed.Preview size limit exceeded, changes collapsed. Show changes
core/modules/ckeditor5/js/ckeditor5_plugins/drupalMedia/src/drupallinkmedia/drupallinkmediaediting.js +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ function upcastMediaLink() { // There's an <drupal-media> inside an <a> element - we consume it so it // won't be picked up by the Link plugin. const consumableAttributes = { attributes: ['href'] }; const consumableAttributes = { attributes: ['href'], name: true }; // Consume the `href` attribute so the default one will not convert it to // $text attribute. Loading
core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php +4 −10 Original line number Diff line number Diff line Loading @@ -791,16 +791,6 @@ public function testLinkability(bool $unrestricted) { // linking media. $this->assertNotEmpty($xpath->query('//a[@href="http://linking-embedded-media.com"]/drupal-media[@data-caption="baz"]')); // Remove caption from media for now to avoid incompatibility issues in GHS // linked media integration. // @todo remove this step after // https://www.drupal.org/project/drupal/issues/3268318 has been resolved. $this->assertNotEmpty($drupalmedia = $assert_session->waitForElementVisible('css', '.ck-content .ck-widget.drupal-media')); $drupalmedia->click(); $this->assertVisibleBalloon('.ck-toolbar[aria-label="Drupal Media toolbar"]'); $this->getBalloonButton('Toggle caption off')->click(); $this->assertTrue($assert_session->waitForElementRemoved('css', '.ck-content .ck-widget.drupal-media figcaption')); // Add `class="trusted"` to the link. $this->assertEmpty($xpath->query('//a[@href="http://linking-embedded-media.com" and @class="trusted"]')); $this->pressEditorButton('Source'); Loading Loading @@ -857,6 +847,10 @@ public function testLinkability(bool $unrestricted) { $assert_session->elementNotExists('css', '.ck-content a'); $assert_session->elementExists('css', '.ck-content .drupal-media.ck-widget > div[aria-label] > article > div > img[src*="image-test.png"]'); // Ensure that figcaption exists. // @see https://www.drupal.org/project/drupal/issues/3268318 $assert_session->elementExists('css', '.ck-content .drupal-media.ck-widget > figcaption'); // Assert the "dataDowncast" HTML after making changes. $xpath = new \DOMXPath($this->getEditorDataAsDom()); $this->assertNotEmpty($xpath->query('//drupal-media')); Loading