⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠


profile picture

setTexteditor() in multi grid


  • profile picture
  • Member

Posted 17 December 2019 - 15:21 PM

In the public function clients_management, I have setup a setActionButton with an action of "chart".

$crud->setActionButton('Chart', 'fa fa-user', function ($row)
{ return '/index.php/clients/chart/' . $row->first_name . ' ' . $row->middle_name . ' ' . $row->last_name . ' : Account No. ' . $row->account;}, false);


Function chart defines two grids, notes and psa.


public function chart($id) {
$crud = $this->_getGroceryCrudEnterprise();

$output = $crud->render();

$crud2 = $this->_getGroceryCrudEnterprise();
$output2 = $crud->render();

$output->output .= '<br/>' . $output2->output;



First grid, notes


public function notes($id) {
$uncode_id = urldecode($id);
$pos = strpos($uncode_id, "No.");
$account_from_string = substr($uncode_id,$pos+4);
$this->autofill_accountId = $account_from_string;
$this->autofill_updated_at = date("Y-m-d - H:m");
$this->autofill_created_at = date("Y-m-d - H:m");
$this->accountId = $id;
$crud = $this->_getGroceryCrudEnterprise();


$crud->where(['notes.account' => $account_from_string]);
$crud->setSubject('a note for ' . $uncode_id);
$crud->displayAs('updated_at','Last Update')
->displayAs('title','Type of Note')
$crud->callbackAddForm(function ($data) {
$data['account'] = $this->autofill_accountId;
$data['created_at'] = $this->autofill_created_at;
$data['updated_at'] = $this->autofill_updated_at;

return $data;});
$output = $crud->render();


When i add or edit a record, with setTexteditor set, the form does nothing. Clicking on add or edit just keeps the same grid up.


Any ideas?

Do I have to use some callback function?


Thanks in advance.




  • profile picture
  • Member

Posted 19 December 2019 - 00:10 AM

So, console shows this.


Uncaught TypeError: 
.ckeditor is not a function
    at Object.texteditor (jquery-plugins.js:32)
    at RichTexteditorWithPlugin.componentDidMount (rich-texteditor-with-plugin.js:28)
    at commitLifeCycles (react.v16.2.0.js:10997)
    at commitAllLifeCycles (react.v16.2.0.js:12173)
    at HTMLUnknownElement.callCallback (react.v16.2.0.js:2265)
    at Object.invokeGuardedCallbackDev (react.v16.2.0.js:2304)
    at invokeGuardedCallback (react.v16.2.0.js:2161)
    at commitRoot (react.v16.2.0.js:12277)
    at performWorkOnRoot (react.v16.2.0.js:13244)
    at performWork (react.v16.2.0.js:13194)

texteditor: function texteditor($selector) {


There is a previously unanswered question about ckeditor in multi-grids.