Skip to content

Parse embeds is not replacing the <oembed> tag on the front end #605

Description

@anita-chouhan

Description

We have a CKEditor body field in a project that allows authors to embed videos. We have kept the Parse embeds option enabled for the field. The YouTube embedded videos are showing fine in the control panel, but the <oembed> tag is not getting replaced with the provider’s embed code for the front end.

Steps to reproduce

  1. Add a CKEditor field with the option to embed videos.
  2. Enable the Parse embeds option in the field.
  3. Disable the Purify HTML option.
  4. Use this field on an entry and add content.

Additional info

  • Craft version: 5.10.1
  • PHP version: 8.2.31
  • Database driver & version: MySQL 8.0.46
  • CKEditor version: 5.6.1

CKEditor field toolbar

Image

CKEditor field config options

{
  "code": {
    "indentSequence": "  "
  },
  "htmlSupport": {
    "allow": [
      {
        "attributes": true,
        "classes": true
      }
    ]
  },
  "image": {
    "toolbar": [
      "imageStyle:alignLeft",
      "imageStyle:alignRight",
      "imageStyle:alignCenter",
      "ImageResize:true",
      "toggleImageCaption"
    ]
  },
  "link": {
    "decorators": {
      "openInNewTab": {
        "attributes": {
          "target": "_blank"
        },
        "label": "Open in a new tab",
        "mode": "manual"
      }
    },
    "defaultProtocol": "http:\/\/"
  },
  "list": {
    "properties": {
      "reversed": false,
      "startIndex": true,
      "styles": false
    }
  },
  "style": {
    "definitions": [
      {
        "classes": [
          "pull-quote"
        ],
        "element": "blockquote",
        "name": "Pull Quote"
      },
      {
        "classes": [
          "prose-buttons-parent"
        ],
        "element": "p",
        "name": "Button"
      }
    ]
  }
}

Note

If we enable previewsInData in the CKEditor config, then the <oEmbed> tags are replaced with an iframe in the frontend on updating content.

 {
    "mediaEmbed": {
      "previewsInData": true
    }
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions