【问题标题】:bootstrap3-wysihtml5 insert auto image responsive classbootstrap3-wysihtml5 插入自动图像响应类
【发布时间】:2018-07-05 12:58:15
【问题描述】:

我正在为我的文本框使用 bootstrap3-wysihtml5,但我希望我的图像在插入它们时自动具有响应类,我尝试在没有类的情况下插入图像,然后进入代码模式并添加图像但是当进入模式看到类被删除。也就是说,不可能维护响应式类。有什么方法可以在类中插入图像吗?作为一个奇怪的事实,属性 alt = "" 被插入,当在代码模式下修改或写入属性内的图像描述时,当传递到预览模式时,如果它们保持这些更改。

这是我插入图片时的样子:

<p><img alt="" src="http://example/01.jpg"><br></p>

这就是我想要的:

<p><img alt="" src="http://example/01.jpg" class="img-responsive"><br></p>

我知道我必须修改 .js 中的某些内容,但我不知道我必须在代码的哪一部分添加类。这里有我正在使用的完整代码:

https://github.com/bootstrap-wysiwyg/bootstrap3-wysiwyg/blob/master/dist/bootstrap3-wysihtml5.all.min.js

【问题讨论】:

    标签: twitter-bootstrap wysihtml5 bootstrap-wysihtml5


    【解决方案1】:

    对于图像响应应用这些属性到 img 或者创建一个类并在其中添加这些属性

    最大宽度:100%; 高度:自动;

    【讨论】:

      猜你喜欢
      • 2015-02-14
      • 2016-01-23
      • 2017-07-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-05
      • 2015-02-11
      • 1970-01-01
      相关资源
      最近更新 更多