2

这是我正在使用的代码

<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"从文本区域中删除,则发布值即将到来

4

2 回答 2

3

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

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

.submit提交按钮的类别在哪里

于 2013-07-24T21:03:13.323 回答
0

简单的方法 :

粘贴您的脚本:

var editor = new TINY.editor.edit('editor', { id: 'tinyeditor', 等等.....

在按钮表单上

input type="submit" value="Envoyer" onClick="editor.post(); "

等等

于 2014-02-25T09:12:53.930 回答