-
-
Notifications
You must be signed in to change notification settings - Fork 308
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
HTML tags are converting/deleting in codeView #1108
Comments
Add the "__se__tag" class to the top-level element. |
@JiHong88 If you notice, We already have this class on the top of the element as per the documentation. The funny thing is if we have one image in HTML it works fine but if we have multiple images, it behaves oddly. It removes parent HTML tags (in this case tag has been removed and image wrapper put outside of parent |
@JiHong88 Is there something you find at your end? |
@developergaurav Can you show me the "HTML" string you are testing right now? |
@JiHong88 Here is the "HTML" code: ` |
@developergaurav "HTML" code is missing. |
@JiHong88 Actually, it is there but somehow GitHub makes it invisible. Attached again: <section class="content-pages page-brands">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="brand-outer">
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo1.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo2.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo3.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo4.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo5.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo6.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo7.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo8.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo9.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo10.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo11.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo12.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo13.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo14.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo1.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo15.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo16.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo17.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo18.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo19.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo20.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo21.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo22.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo23.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo24.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo25.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo26.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo27.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo28.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo29.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo30.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo31.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo32.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo33.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo34.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo35.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo36.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo37.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo38.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo39.png" alt="" />
</a>
</div>
<div class="brand-items">
<a href="javascript:void()" target="_blank">
<img src="https://example.com/uploads/images/logo40.png" alt="" />
</a>
</div>
</div>
</div>
</div>
</div>
</section> |
The 2.44.4 version has been updated. |
Describe the bug
I am using sun-editor v3.4.1 in react. but it is not working right with image tags. I have whitelisted multiple tags and even tried to use se-component and __se__tag as suggested in the document. It is replacing the tags and removes the parent tag automatically.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should remain to its own parent somehow and shouldn't remove parent tags.
Screenshots
![Screenshot 2022-10-18 at 4 32 15 PM](https://user-images.githubusercontent.com/24787317/196412593-6578c090-70b2-484a-9e17-063788414502.png)
Additional context
<section class="content-pages page-brands se-component"> <div class="container __se__tag"> <div class="row"> <div class="col-lg-12"> <div class="brand-outer"> <div class="brand-items"> <a href="javascript:void()" target="_blank"> <img src="https://example.com/uploads/images/logo1.png" alt="" /> </a> </div> <div class="brand-items"> <a href="javascript:void()" target="_blank"> <img src="https://example.com/uploads/images/logo2.png" alt="" /> </a> </div> </div> </div> </div> </div> </section>
The text was updated successfully, but these errors were encountered: