2013-07-24 62 views
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"然後張貼價值未來

+0

爲什麼笨-2和笨-URL標記? –

+0

我在笨執行這就是爲什麼!!!!!!!!,請幫助我 –

+0

最有可能你是不正常在發佈之前將微代碼的價值移動到原始文本區**請閱讀微代碼的文檔** –

回答

3

您需要從編輯器JS發佈數據:

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

哪裏.submit是一流的提交按鈕

+1

超級就是這個解決方案!!!!!!!!!!!!!!!!!!! –

0

容易的方式:

粘貼您的腳本:

VAR 編輯 =新TINY.editor.edit( '編輯',{ ID:'按鈕形式

inpu上tinyeditor」, 等.....

t type =「submit」value =「Envoyer」onClick =「editor.post();

等瞧