javascript - 如何在同一页面上初始化多个 wysihtml5 编辑器?
问题描述
当我用类名初始化 bootstrap-wysihtml5 时,它只会初始化第一个,其余的保持正常的文本区域
有什么办法可以处理
<script>
$(document).ready(function() {
$('.vid_description').wysihtml5();
});
</script>
解决方案
我猜,方法 wysihtml5() 只对第一个元素调用。
遍历所有元素并分别调用每个元素的初始化方法:
$('.vid_description').each(function() {
$(this).wysihtml5();
});
推荐阅读
- python - 在 Pyspark 的协作过滤推荐器中调用“转换”方法时出错
- python - 烧瓶错误:无法加载芹菜应用程序
- python - 如何使用 Brython 脚本查找所有 cookie 和标头字段
- crystal-lang - 是否可以仅为有限类型扩展类?
- c - 将字符与C中的字符串进行比较
- haskell - QuickCheck 顺序映射键生成
- r - R中的FFTrees在cats[match(names(xlevels), colnames(X))] <- unlist(lapply(xlevels, : NAs are not allowed in subscripted assignments)中给出错误
- javascript - ReactJS 使用异步 setState 更新状态的最佳方法
- cloudera - 无法在 Cloudera Hue 的表详细信息中加载标签
- docker - 实际图像的大小是多少?