JiHong88 / suneditor

Pure javascript based WYSIWYG html editor, with no dependencies.
http://suneditor.com
MIT License
1.67k stars 308 forks source link

Video plugin does not handle percentage correctly #1364

Open spiff123 opened 4 months ago

spiff123 commented 4 months ago

Describe the bug The video plugin does loose the width/height percentage when editing a already inserted video.

To Reproduce Steps to reproduce the behavior:

  1. Go here http://suneditor.com/sample/index.html
  2. Insert a video like this https://www.youtube.com/watch?v=Qx3csJaCnWY&list=PLi8ZVZZLpNVYFO4ENMP-qIjF5OtPBYVA6&index=22 with a width of e.g. 75%
  3. Then change to editor source code view and back
  4. Then the size of the video is 100% again. You can see in the html there are some weird 100% and 75% width styles mixed.

Expected behavior It would be nice if the editor stores the width percent correctly and keeps it on change to code or save and reload.

Desktop (please complete the following information):