Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

button is added to span with 'html-object-embed ck-widget ck-widget_selected' class. #16379

Open
lathalks opened this issue May 17, 2024 · 0 comments
Labels
type:bug This issue reports a buggy (incorrect) behavior.

Comments

@lathalks
Copy link

lathalks commented May 17, 2024

📝 Provide detailed reproduction steps (if any)

I am adding a content in CKeditor 5 .The html content is

<div style="text-align:center;">
<button class=" btn btn-primary d-inline-block mt-4" data-bs-dismiss="modal" href="javascript:void(0);" id="closebtn"><span class="link">Close</span></button></span></div>

✔️ Expected result

<div style="text-align:center;">
<button class=" btn btn-primary d-inline-block mt-4" data-bs-dismiss="modal" href="javascript:void(0);" id="closebtn"><span class="link">Close</span></button></span></div>

What is the expected result of the above steps?

❌ Actual result

<div style="text-align:center;">
<span class="html-object-embed ck-widget ck-widget_selected" data-html-object-embed-label="HTML object" contenteditable="false"><button class="html-object-embed__content btn btn-primary d-inline-block mt-4" data-bs-dismiss="modal" data-ck-unsafe-attribute-href="javascript:void(0);" id="closebtn"><span class="link">Close</span></button></span></div>

What is the actual result of the above steps?

❓ Possible solution

I see there is a toObjectWidgetConverter() function in converter.js under html-support package which is converting to this.
Is there a way to stop this conversion.

📃 Other details

  • Browser: …
  • OS: …
  • First affected CKEditor version: …
  • Installed CKEditor plugins: …
    *These are the installed plugins.
    Alignment,
    AutoImage,
    AutoLink,
    Autoformat,
    BlockQuote,
    Bold,
    CKFinder,
    CKFinderUploadAdapter,
    Essentials,
    FindAndReplace,
    FontBackgroundColor,
    FontColor,
    FontFamily,
    FontSize,
    FullPage,
    GeneralHtmlSupport,
    RenderStyleElements,
    Heading,
    Highlight,
    HorizontalLine,
    HtmlComment,
    HtmlEmbed,
    Image,
    ImageCaption,
    ImageInsert,
    ImageResize,
    ImageStyle,
    ImageToolbar,
    //ImageUpload,
    Indent,
    IndentBlock,
    Italic,
    Link,
    LinkImage,
    List,
    Paragraph,
    PasteFromOffice,
    SelectAll,
    ShowBlocks,
    SourceEditing,
    SpecialCharacters,
    SpecialCharactersArrows,
    SpecialCharactersCurrency,
    SpecialCharactersEssentials,
    SpecialCharactersLatin,
    SpecialCharactersMathematical,
    SpecialCharactersText,
    StandardEditingMode,
    Strikethrough,
    Style,
    Subscript,
    Superscript,
    Table,
    TableCaption,
    TableCellProperties,
    TableColumnResize,
    TableProperties,
    TableToolbar,
    TodoList,
    Underline,
    Undo,
    MinimalisticModal

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

@lathalks lathalks added the type:bug This issue reports a buggy (incorrect) behavior. label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

1 participant