有什么方法可以通过类名来选择带有nicEdit的实例,而不仅仅是通过它的 id?
例如:
<div class="myInstance1">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed magna dolor, faucibus ac, iaculis non, cursus et, dui. Donec non urna. Aliquam volutpat ornare augue. Phasellus egestas, nisl fermentum porttitor rutrum, magna metus rutrum risus, id fringilla magna mi nec lorem.
</div>
调用 nicEdit:
<script type="text/javascript">
bkLib.onDomLoaded(function() {
var myNicEditor = new nicEditor();
myNicEditor.setPanel('myNicPanel');
myNicEditor.addInstance('myInstance1');
});
</script>
除非类是 id,否则它不会以这种方式工作。有任何想法吗?