2013-12-18 26 views

回答

1

試試這個:

function getClick(e) { 

     try {    //the name of your editor 
      var editor = $("#editor").data("kendoEditor"); 
      var editorContent = editor.value(); 
      alert(editorContent); 
      //Do Your stuff here 

     } 
     catch (e) { } 
    } 

然後用一個按鈕

<button class="k-button" id="btnPreviewContent" onclick="getClick()">PreviewEditor Content</button> 
+1

打電話,當我嘗試這個我只得到了標記的文本。有沒有辦法獲得所有的html標籤? –

相關問題