Php “小编辑器”无法获取post值
这是我正在使用的代码Php “小编辑器”无法获取post值,php,jquery,codeigniter,iframe,rich-text-editor,Php,Jquery,Codeigniter,Iframe,Rich Text Editor,这是我正在使用的代码 <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: 't
<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>
如果我从文本区域中删除
id=“tinyeditor”
,则post值即将出现您需要使用JS从编辑器中发布数据:
$(document).ready(function(){ $(".submit").click(function(){ editor.post(); }); });
其中,.submit
是提交按钮的类别简易方式:
粘贴脚本:
vareditor=新的TINY.editor.edit('editor'{
id:“tinyeditor”,
等等
在按钮窗体上
输入type=“submit”value=“Envoyer”onClick=“editor.post();”
et voilá为什么使用codeigniter-2和codeigniter url标记?我正在codeigniter中实现这就是为什么!!!!!!!请帮助记住,在发布之前,您可能没有正确地将tinyeditor值移动到原始文本区域。请阅读tinyeditor的文档。您可以发布一个指向该文档的链接吗?除了代码中的注释之外,还有简短的自述,我找不到文档页面
$(document).ready(function(){ $(".submit").click(function(){ editor.post(); }); });