我有一個示例代碼:如何在joomla文本編輯器中發佈數據?
$content = "";
$wysiwyg = JFactory::getEditor();
$html = $wysiwyg->display('html', $content, '100%', '400px', '', '', array(''));
和jQuery
Joomla.submitbutton = function(pressbutton) {
if(pressbutton == 'save') {
jQuery.ajax({
success: function(data) {
jQuery('#html').html('test test test');
}
});
} else {
submitform(pressbutton);
}
}
當我點擊提交保存,文本編輯器不能插入test test test
,如何解決?
你試試這個-HTTP://stackoverflow.com/questions/8740610/how-to-insert-text-to-editor-programaticlly-in-joomla – Irfan