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

Please tell me about how to remove the p tag wrapping #9601

Open
oceanfish567 opened this issue Apr 30, 2024 · 2 comments
Open

Please tell me about how to remove the p tag wrapping #9601

oceanfish567 opened this issue Apr 30, 2024 · 2 comments

Comments

@oceanfish567
Copy link

oceanfish567 commented Apr 30, 2024

📝 Provide detailed reproduction steps (if any)

Please provide the steps to reproduce and if possible a minimal demo of the problem via fiddle.tiny.cloud or similar.

  1. …type <div itemprop="caption" class="image__caption attribution"><span data-editable="metaCaption" class="inline-placeholder">A view of Diamondhead on the Oahu, Hawaii, coastline. Downtown Honolulu is to the right of Diamondhead.</span></div>
  2. …save it in source code window

✔️ Expected result

What is the expected result of the above steps?
If I enter html tag syntax in the editor, is there a way to prevent the editor from having p tag packaging? I hope it can be kept as it is?

❌ Actual result

What is the actual result of the above steps?
it will becaome: <p><div itemprop="caption" class="image__caption attribution"><span data-editable="metaCaption" class="inline-placeholder">A view of Diamondhead on the Oahu, Hawaii, coastline. Downtown Honolulu is to the right of Diamondhead.</span></div></p>

❓ Possible solution

If you have ideas, you can list them here. Otherwise, you can delete this section.

  1. I saw someone on the Internet saying that forced_root_block: false and html_verify: false have not changed after I used them. Is it not supported by tinymce7?
  2. A friend told me to type directly in the source code window. This method works.

📃 Other details

  • Browser: …
  • OS: …
  • First affected version: …
  • Worked in version: …

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

@spocke
Copy link
Member

spocke commented May 2, 2024

I wasn't able to reproduce this if I paste that into the code editor then it's retained as is. TinyMCE follows HTML standards so DIV is not a valid child of P so never seen this before. So need a proper reproduction case here.

@oceanfish567
Copy link
Author

I wasn't able to reproduce this if I paste that into the code editor then it's retained as is. TinyMCE follows HTML standards so DIV is not a valid child of P so never seen this before. So need a proper reproduction case here.

yes, as long as I paste the html code in the source code, there will be no p packaging problem. tks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants