Skip to content

Commit

Permalink
fixing bug in ckeditor
Browse files Browse the repository at this point in the history
  • Loading branch information
nnunn authored Jul 9, 2020
1 parent af12261 commit 5889083
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions system/helpers/ckeditor_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ function cke_create_instance($data = array()) {
$return .= $k . " : '" . $v . "'";
}

if($k !== end(array_keys($data['config']))) {
$endkeys = (array_keys($data['config']));
if($k !== end($endkeys)) {
$return .= ",";
}
}
Expand Down Expand Up @@ -105,15 +106,17 @@ function display_ckeditor($data = array())

$return .= "'" . $k2 . "' : '" . $v2 . "'";

if($k2 !== end(array_keys($v['styles']))) {
$endkeys2 = array_keys($v['styles']);
if($k2 !== end($endkeys2)) {
$return .= ",";
}
}
}

$return .= '} }';

if($k !== end(array_keys($data['styles']))) {
$endkeys3 = array_keys($data['styles']);
if($k !== end($endkeys3)) {
$return .= ',';
}

Expand Down Expand Up @@ -159,4 +162,4 @@ function config_data($data = array())

}
return $return;
}
}

0 comments on commit 5889083

Please sign in to comment.