D10 : video embed field wysiwyg fails on CKeditor dependency

Created on 14 May 2024, about 1 year ago

Problem/Motivation

ona new D10 install, the wysiwyg install fails as it requires CKeditor and can't find it in D10

Steps to reproduce

clean D10 install, install video embed field module, try to enable wysiwyg submodule

Proposed resolution

The solution proposed on te dev version works : https://www.drupal.org/project/video_embed_field/issues/3290374 📌 Automated Drupal 10 compatibility fixes RTBC
=> Anas_maw #25 : https://www.drupal.org/files/issues/2023-06-03/3290374-25.patch

Remaining tasks

integrate this in dev and non dev

User interface changes

none

API changes

none

Data model changes

none

🐛 Bug report
Status

Active

Version

2.5

Component

Code

Created by

🇧🇪Belgium ehanuise

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @ehanuise
  • Status changed to Needs review 10 months ago
  • 🇮🇳India vinai_katiyar Delhi NCR

    Hi @ehanuise,

    There are two issues faced when tried to install and enable the submodule "Video Embed WYSIWYG" on new D10 setup.

    1. By default "Video Embed WYSIWYG" submodule has dependancy on CKEditor4.
    2. CKEditor 5 only works with HTML-based text formats. The "Video Embed WYSIWYG" (video_embed_wysiwyg) filter implies this text format is not HTML anymore.

    To resolve both issues mentioned above, I applied the following patch, and it worked for me.

    1. https://www.drupal.org/files/issues/2024-03-13/3311063-56.patch

    Kindly refer the screenshots for reference.

  • 🇦🇺Australia jannakha Brisbane!

    Video Embed WYSIWYG doesn't support CKEditor5.
    CKEditor 4 is removed from D10.

    Just use media, it's a core module.

  • 🇮🇳India rajeshreeputra Pune

    this seems related to Add support for Ckeditor 5 Needs review .

  • The problem now, with ckeditor 5 is that the filter plugin definition 'type' is not being picked up in the Annotation.
    Here's how the top of the file should look, using php attributes.

    namespace Drupal\video_embed_wysiwyg\Plugin\Filter;
    
    use Drupal\filter\Plugin\FilterInterface;
    use Drupal\filter\Attribute\Filter;
    use Drupal\Core\StringTranslation\TranslatableMarkup;
    use Drupal\Component\Utility\Html;
    use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
    use Drupal\Core\Render\RendererInterface;
    use Drupal\Core\Session\AccountProxyInterface;
    use Drupal\filter\FilterProcessResult;
    use Drupal\filter\Plugin\FilterBase;
    use Drupal\video_embed_field\Plugin\Field\FieldFormatter\Video;
    use Drupal\video_embed_field\ProviderManagerInterface;
    use Symfony\Component\DependencyInjection\ContainerInterface;
    
    /**
     * The filter to turn tokens inserted into the WYSIWYG into videos.
     */
    #[Filter(
      id: "video_embed_wysiwyg",
      title: new TranslatableMarkup("Enables the use of video_embed_wysiwyg."),
      type: FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE
    )]
    class VideoEmbedWysiwyg extends FilterBase implements ContainerFactoryPluginInterface {
    
Production build 0.71.5 2024