Skip to content
Snippets Groups Projects
Commit a1a6850e authored by Adam G-H's avatar Adam G-H Committed by Mark Fullmer
Browse files

Issue #3441909: In CKEditor 5, LinkIt is incompatible with Media Entity...

Issue #3441909: In CKEditor 5, LinkIt is incompatible with Media Entity Download because it doesn't tell CKEditor about required data attributes on the <a> tag
parent e79b341b
No related branches found
No related tags found
3 merge requests!78Issue #3472672: Fix the issues reported by PHP_CodeSniffer,!59Revert "Issue #2900766 by rubendello: Not all autocomplete values are...,!48Add required attributes
Pipeline #154291 passed with warnings
......@@ -6,7 +6,7 @@ namespace Drupal\linkit\Plugin\CKEditor5Plugin;
use Drupal\ckeditor5\Plugin\CKEditor5PluginConfigurableTrait;
use Drupal\ckeditor5\Plugin\CKEditor5PluginDefault;
use Drupal\ckeditor5\Plugin\CKEditor5PluginConfigurableInterface;
use Drupal\ckeditor5\Plugin\CKEditor5PluginElementsSubsetInterface;
use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
......@@ -18,7 +18,7 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
/**
* CKEditor 5 Linkit plugin configuration.
*/
class Linkit extends CKEditor5PluginDefault implements CKEditor5PluginConfigurableInterface, ContainerFactoryPluginInterface {
class Linkit extends CKEditor5PluginDefault implements CKEditor5PluginElementsSubsetInterface, ContainerFactoryPluginInterface {
use CKEditor5PluginConfigurableTrait;
......@@ -49,6 +49,14 @@ class Linkit extends CKEditor5PluginDefault implements CKEditor5PluginConfigurab
);
}
/**
* {@inheritdoc}
*/
public function getElementsSubset(): array {
// @see \Drupal\linkit\Plugin\Filter\LinkitFilter
return ['<a data-entity-type data-entity-uuid data-entity-substitution>'];
}
/**
* {@inheritdoc}
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment