Index: trunk/extensions/LiquidThreads/lqt.js |
— | — | @@ -847,8 +847,16 @@ |
848 | 848 | 'handleAJAXSave' : function( e ) { |
849 | 849 | var editform = $j(this).closest('.lqt-edit-form'); |
850 | 850 | var type = editform.find('input[name=lqt_method]').val(); |
851 | | - |
852 | | - var text = editform.find('#wpTextbox1').val(); |
| 851 | + var wikiEditorContext = editform.find('#wpTextbox1').data( 'wikiEditor-context' ); |
| 852 | + var text; |
| 853 | + |
| 854 | + if ( !wikiEditorContext || typeof(wikiEditorContext) == 'undefined' || |
| 855 | + ! wikiEditorContext.$iframe) { |
| 856 | + text = editform.find('#wpTextbox1').val(); |
| 857 | + } else { |
| 858 | + text = wikiEditorContext.$textarea.textSelection( 'getContents' ); |
| 859 | + } |
| 860 | + |
853 | 861 | var summary = editform.find('#wpSummary').val(); |
854 | 862 | |
855 | 863 | var signature; |