【问题标题】:Resizing images in contentEditable-div stopped working in Firefox在 contentEditable-div 中调整图像大小在 Firefox 中停止工作
【发布时间】:2019-05-18 19:13:42
【问题描述】:

不幸的是,在具有 contenteditable 属性的 div 中调整大小和选择图像在 Firefox 更新 (64.0) 后停止工作。有什么我需要更改/添加标志或其他东西以使其正常工作吗?

示例代码:https://codepen.io/danielpixelz/pen/PXGeaN

<div contenteditable="true" class="i-want-to-be-editable">
<img src="https://placehold.it/200x200">
</div>

【问题讨论】:

    标签: html firefox contenteditable content-editor


    【解决方案1】:

    好的,问题解决了。现在默认禁用:https://bugzilla.mozilla.org/show_bug.cgi?id=1449564

    需要使用手动激活它

    document.execCommand(enableObjectResizing, false, "true")
    

    参考:https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-10-22
      • 1970-01-01
      • 1970-01-01
      • 2011-12-23
      • 2013-02-04
      • 2015-10-21
      • 1970-01-01
      相关资源
      最近更新 更多