gpt4 book ai didi

php - 小编辑器没有获得帖子值(value)

转载 作者:行者123 更新时间:2023-12-01 03:42:36 25 4
gpt4 key购买 nike

这是我正在使用的代码

<textarea name="tinyeditor" id="tinyeditor" style="width: 800px; height: 500px"></textarea>
<script>
var editor = new TINY.editor.edit('editor', {
id: 'tinyeditor',
width: 750,
height: 350,
cssclass: 'tinyeditor',
controlclass: 'tinyeditor-control',
rowclass: 'tinyeditor-header',
dividerclass: 'tinyeditor-divider',
controls: ['bold', 'italic', 'underline', 'strikethrough', '|', 'subscript', 'superscript', '|',
'orderedlist', 'unorderedlist', '|', 'outdent', 'indent', '|', 'leftalign',
'centeralign', 'rightalign', 'blockjustify', '|', 'unformat', '|', 'undo', 'redo', 'n',
'image', 'hr', 'link', 'unlink', '|', 'print'],
footer: true,
fonts: ['Verdana','Arial','Georgia','Trebuchet MS'],
xhtml: true,
bodyid: 'editor',
footerclass: 'tinyeditor-footer',
toggle: {text: 'source', activetext: 'wysiwyg', cssclass: 'toggle'},
resize: {cssclass: 'resize'}
});
</script>

我的帖子输出是这样的

Array ( [tinyeditor] => [templatename] => test [content] => [textedito] => [Submit_x] => 48 [Submit_y] => 14 ) 

如果我从文本区域中删除 id="tinyeditor" 那么发布值就会到来

最佳答案

您需要使用JS从编辑器发布数据:

$(document).ready(function(){ $(".submit").click(function(){ editor.post(); }); });

其中.submit是提交按钮的类

关于php - 小编辑器没有获得帖子值(value),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17841262/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com