ueditor使用

1.页面导入js

<!--编辑器 start-->
        <script type="text/javascript" src="${base}/js/ud/editor_config.js"></script>
        <script type="text/javascript" src="${base}/js/ud/editor_all.js"></script>
        <script type="text/javascript" src="${base}/js/ud/uparse.js"></script>
        <script type="text/javascript" src="${base}/js/ud/_examples/editor_api.js"></script>
<!--编辑器 end-->

2.如有代码,则需要导入

<!--ueditor代码start-->
<script type="text/javascript" src="${base}/js/ud/third-party/SyntaxHighlighter/shCore.js"></script>
<link rel="stylesheet" href="${base}/js/ud/third-party/SyntaxHighlighter/shCoreDefault.css" type="text/css" />
<script>
SyntaxHighlighter.all() //执行代码高亮
</script>
<!--ueditor代码end-->

3.内容获取

var editor=$("#editor").val(UE.getEditor('editor').getContent());


你可能感兴趣的:(java,ueditor,使用)