function grid_render() { parent::grid_render(); //------------- Обработчики событий для полей с использованием FCKeditor ----------- //для вывода полей с использованием FCKeditor echo '<script>'; echo '$grid.bind(\'jqGridAddEditAfterShowForm\', function(event, $form) { //var oFCKeditor = new FCKeditor( "description" ) ; //oFCKeditor.BasePath = "/wysiwyg/fckeditor/" ; //oFCKeditor.Height = 300 ; //oFCKeditor.ToolbarSet = "BasicA"; //oFCKeditor.ReplaceTextarea() ; gridEditWysiwyg("description"); }); '; //echo '</script>'; //echo "<script>"; // Для записи изменений с использованием FCKeditor echo '$grid.bind(\'jqGridAddEditClickSubmit\', function(event, $form) { oEditor = FCKeditorAPI.GetInstance("description"); //получаем ссылку на объект "редактор" //description = oEditor.GetXHTML("html"); //text = oEditor.GetXHTML("html"); return { description: oEditor.GetHTML() //вызываем метод у объекта }; }); '; echo 'function gridEditWysiwyg(field) { var oFCKeditor = new FCKeditor( field ) ; oFCKeditor.BasePath = "/wysiwyg/fckeditor/" ; oFCKeditor.Height = 300 ; oFCKeditor.ToolbarSet = "BasicA"; oFCKeditor.ReplaceTextarea() ; }'; echo '</script>'; }