報如下錯誤
解決辦法:
//對編輯器的操作最好在編輯器ready之后再做
ue.ready(function() {
})
<!-- 實例化編輯器 -->
<script type="text/javascript">
$(function(){
var ue = UE.getEditor("container",{
autoHeight: false
});
/對編輯器的操作最好在編輯器ready之后再做
ue.ready(function() {
//設置編輯器的內容
ue.setContent('hello');
//獲取html內容,返回: <p>hello</p>
var html = ue.getContent();
alert(html)
//獲取純文本內容,返回: hello
var txt = ue.getContentTxt();
alert(txt);
});
});
</script>