private function findStyleConflictingPluginLabel(HTMLRestrictions
$needle): TranslatableMarkup
{ foreach ($this->pluginManager->
getDefinitions() as $id =>
$definition) { // We're looking to find the other plugin, not this one.
if ($id === 'ckeditor5_style'
) { continue;
} assert($definition instanceof CKEditor5PluginDefinition
);
if (!
$definition->
hasElements()) { continue;
} $haystack = HTMLRestrictions::
fromString(implode($definition->
getElements()));
if ($id === 'ckeditor5_sourceEditing'
) { // The Source Editing plugin's allowed elements are based on stored
// config. This differs from all other plugins, which establish allowed
// elements as part of their definition. Because of this, the $haystack
// is calculated differently for Source Editing.
$text_editor =
$this->
createTextEditorObjectFromContext();
$editor_plugins =
$text_editor->
getSettings()['plugins'
];