UEditor百度编辑器在html代码模式无法更新内容的解决办法
<script type="text/javascript"> function getContent() { if(UE.getEditor("contents").queryCommandState('source')!=0) UE.getEditor("contents").execCommand('source'); } </script> <script id="contents" name="contents" type="text/plain" style="width:98%;height:400px;"><{$product.contents}></script> <input type="submit" value="确认修改" class="bginput" onclick="getContent()" />
主要是是增加了代码
<script type="text/javascript"> function getContent() { if(UE.getEditor("contents").queryCommandState('source')!=0) UE.getEditor("contents").execCommand('source'); } </script>
提交按钮增加代码
OnClick="getContent()"