1 Star 0 Fork 296

清风/ueditor-plus

forked from ModStartLib/ueditor-plus 
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
setWidthHeightDemo.html 1.88 KB
一键复制 编辑 原始数据 按行查看 历史
MZ 提交于 2023-11-01 11:03 +08:00 . build
<!DOCTYPE HTML>
<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?{timestamp}"></script>
<script type="text/javascript" charset="utf-8" src="editor_api.js?{timestamp}"></script>
<!--建议手动加在语言,避免在ie下有时因为加载语言失败导致编辑器加载失败-->
<script type="text/javascript" charset="utf-8" src="../lang/zh-cn/zh-cn.js?{timestamp}"></script>
<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>UEditor设置宽高demo</h1>
<h2><span style="color:red">这里的宽高都只是编辑区域的宽高,不包括工具栏的高度和状态栏的高度</span></h2>
<h2>容器给定编辑器的宽高</h2>
<script type="text/plain" id="myEditor" style="width:500px;height:500px"></script>
<div style="clear:both"></div>
<h2>初始化时给定编辑器的宽高</h2>
<script type="text/plain" id="myEditor1"></script>
<h2>没有工具栏的编辑器</h2>
<div id="myEditor2" style="width:700px;height:300px;border:1px solid #ccc"></div>
<script type="text/javascript">
//根据容器的宽高
//容器给定高度
UE.getEditor('myEditor');
UE.getEditor('myEditor1', {
initialFrameWidth: 600,
initialFrameHeight: 600
});
var noToolbar = new UE.Editor();
noToolbar.render('myEditor2', {
autoFloatEnabled: false
})
</script>
</div>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/pdtyf/ueditor-plus.git
git@gitee.com:pdtyf/ueditor-plus.git
pdtyf
ueditor-plus
ueditor-plus
master

搜索帮助