不灭的焱

加密类型:SHA/AES/RSA下载Go
复合类型:切片(slice)、映射(map)、指针(pointer)、函数(function)、通道(channel)、接口(interface)、数组(array)、结构体(struct) Go类型+零值nil
引用类型:切片(slice)、映射(map)、指针(pointer)、函数(function)、通道(channel) Go引用

作者:AlbertWen  添加时间:2015-10-30 00:11:01  修改时间:2025-11-10 08:06:33  分类:06.前端/Vue/Node.js  编辑

问题1:一个页面如何放置多个Ueditor?

参考代码如下:

<form  method="post" action="save.php">

<script type="text/plain" id="ueditorId_1" name="ueditorName_1" style="width: 400px;height:500px;">编辑器的默认值_1</script>

<script type="text/javascript">
    UE.getEditor('ueditorId_1');
</script>

 

<script type="text/plain" id="ueditorId_2" name="ueditorName_2" style="width: 450px;height:550px;">编辑器的默认值_2</script>

<script type="text/javascript">
    UE.getEditor('ueditorId_2');
</script>

</form>

这样,就会在页面中渲染2个Ueditor编辑器。

 

问题2:PHP如何获取Ueditor的值?

注意,上面的 ueditorName_1ueditorName_2 即为表单的Name值,所以服务端PHP获取Ueditor编辑器的值变得很简单,参考代码如下:

$_POST["ueditorName_1"];  // 第一个编辑器的值

$_POST["ueditorName_2"];  // 第二个编辑器的值