[英]In CkEditor 4.3 with Image2 plugin, what is the right way to change the image src?
[英]is it possible to change the Wrapper “<div>” of Image in Image2 ckeditor plugin?
我正在使用带有CKeditor的image2插件,我来看看我不能使用“Div”作为图像包装器。
当Captioned小部件与中心alginment一起使用时,Image2插件使用“Div”作为“Figure”标签的包装器
喜欢:带有中心alginment的标题小部件
│ center │<wrapper class=”center”> │<div class=”center”> │
│ │ <figure /> │ <figure /> │
│ │</wrapper> │</div> |
那么可以用任何其他标签替换这个包装“Div”吗?
HTML代码是我必须关闭的数字..
<wrapper class="center">
<figure></figure>
</wrapper>
并且jQuery代码替换了包含中心类的所有包装器标签。
<script type="text/javascript">
$("wrapper.center").each(function() {
$(this).replaceWith( "<div class="+ $( this ).attr('class') +">" + $(this).html() + "</div>" );
});
</script>
如果你想删除特定的只有一个标签,那么jQuery就是。
<script type="text/javascript">
$("wrapper.center").replaceWith( "<div class="+ $( this ).attr('class') +">" + $(this).html() + "</div>" );
</script>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.