1 Star 0 Fork 296

cgb-lowcode/ueditor-plus

forked from ModStartLib/ueditor-plus 
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
highlightDemo.html 1.71 KB
一键复制 编辑 原始数据 按行查看 历史
MZ 提交于 2023-11-01 11:03 +08:00 . build
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title></title>
<script type="text/javascript" charset="utf-8" src="../ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="editor_api.js"></script>
<!--加入高亮的js和css文件,如果你的编辑器和展示也是一个页面那么高亮的js可以不加载-->
<script type="text/javascript" charset="utf-8" src="../third-party/SyntaxHighlighter/shCore.js"></script>
<link rel="stylesheet" type="text/css" href="../third-party/SyntaxHighlighter/shCoreDefault.css"/>
<script>var _hmt = _hmt || [];
(function () {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?f84f35a44b5cc5c0b10c3fabdf0f322b";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();</script>
<link rel="stylesheet" href="./style.css"/>
</head>
<body class="demo-editor-page">
<div>
<h1>代码高亮演示</h1>
<h2>获得编辑器实例</h2>
<div style="width:200px">
<pre class="brush:js;toolbar:false;">
UE.getEditor('myEditor');
</pre>
</div>
</div>
<!--style给定宽度可以影响编辑器的最终宽度-->
<script type="text/plain" id="myEditor" style="width:500px">
<h3>实例化编辑器</h3>
<pre class="brush:js;toolbar:false;">
UE.getEditor('myEditor');
</pre>
</script>
<script type="text/javascript">
//为了在编辑器之外能展示高亮代码
SyntaxHighlighter.highlight();
UE.getEditor('myEditor');
</script>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/cgb-lowcode/ueditor-plus.git
git@gitee.com:cgb-lowcode/ueditor-plus.git
cgb-lowcode
ueditor-plus
ueditor-plus
master

搜索帮助