微小的编辑没有获得后期价值
这是我正在使用的代码
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'} });
我的post输出是这样的
Array ( [tinyeditor] => [templatename] => test [content] => [textedito] => [Submit_x] => 48 [Submit_y] => 14 )
如果我从文本区域删除id="tinyeditor"
,则后期值即将发布
您需要使用JS从编辑器发布数据:
$(document).ready(function(){ $(".submit").click(function(){ editor.post(); }); });
其中.submit
是提交按钮的类
简单的方法 :
粘贴你的脚本:
var editor = new TINY.editor.edit(’editor’,{id:’tinyeditor’,etc …..
在按钮表格上
input type =“submit”value =“Envoyer” onClick =“editor.post(); ”
etvoilà