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 に答える