拖动以在Summernote编辑器中重新排列图像

时间:2019-05-03 01:51:05

标签: rich-text-editor summernote

这是一个很棒的编辑器,但是它不允许用户重新排列已经插入的图像。如果您尝试拖动图像,则将假定您正在拖放要上传的新图像,并最终插入了一些透明框。该框后面的HTML就是这种怪诞:

<p>544x184 (Original: 544x184)
</p><div class="note-handle" style="box-sizing: border-box;"><div class="note-control-selection" style="box-sizing: border-box; position: absolute; display: block; border: 1px solid black; left: 554px; top: 10px; width: 544px; height: 184px;"><br class="Apple-interchange-newline"><div class="note-control-holder note-control-nw" style="box-sizing: border-box; position: absolute; width: 7px; height: 7px; border-width: 1px 0px 0px 1px; border-top-style: solid; border-right-style: initial; border-bottom-style: initial; border-left-style: solid; border-top-color: black; border-right-color: initial; border-bottom-color: initial; border-left-color: black; border-image: initial; top: -5px; left: -5px;"></div><div class="note-control-holder note-control-ne" style="box-sizing: border-box; position: absolute; width: 7px; height: 7px; border-top: 1px solid black; border-right: 1px solid black; border-bottom: 0px; border-left: none; border-image: initial; top: -5px; right: -5px;"></div><div class="note-control-holder note-control-sw" style="box-sizing: border-box; position: absolute; width: 7px; height: 7px; border-width: 0px 0px 1px 1px; border-top-style: initial; border-right-style: initial; border-bottom-style: solid; border-left-style: solid; border-top-color: initial; border-right-color: initial; border-bottom-color: black; border-left-color: black; border-image: initial; bottom: -5px; left: -5px;"></div><div class="note-control-sizing note-control-se" style="box-sizing: border-box; position: absolute; width: 7px; height: 7px; background-color: white; border: 1px solid black; right: -5px; bottom: -5px; cursor: se-resize;"></div><div class="note-control-selection-info" style="box-sizing: border-box; position: absolute; right: 0px; bottom: 0px; padding: 5px; margin: 5px; font-size: 12px; color: rgb(255, 255, 255); background-color: rgb(0, 0, 0); border-radius: 5px; opacity: 0.7;">544x184 (Original: 544x184)</div></div></div><p><br class="Apple-interchange-newline">

我不需要拖放,不需要在每个图像上使用style="width: ___;",也不需要嵌入式base64。我确实需要用户能够重新排列他们的图像,而不必删除它然后重新上传它。这可能吗?

无法解决的相关问题: https://github.com/summernote/summernote/issues/2103 https://github.com/summernote/summernote/issues/2311 https://github.com/summernote/summernote/issues/215

0 个答案:

没有答案