[
"label" => "Custom Config File",
"note" => "If enabled, a custom configuration is included, either " . THEMES_PKG_PATH . "/styles/<current-style>/ckeditor/ckconfig.custom.js, or " . CKEDITOR_PKG_DIR . "/ckconfig.custom.js. It may be a modified copy of ckconfig.js or of ckconfig.bitweaver.js. Depending on the modifications, a few of the settings below might not work anymore as expected (e.g., toolbar or skin settings).",
],
"ckeditor_debug" => [
"label" => "Enabled debugging",
"note" => "Enable support for debug message output. On first debug message a window will pop up.",
],
"ckeditor_on_click" => [
"label" => "Load CKEditor on Click",
"note" => "Delay loading the CKEditor until the user clicks on the text area.",
],
"ckeditor_ask" => [
"label" => "Ask to use CKEditor",
"note" => "If set the user will be prompted if they want to use CKEditor for a given textbox. This option implies Load CKEditor on Click even if it is not set.",
],
];
// Toolbars
$gBitSmarty->assign( "formCkeditorFeatures", $formCkeditorFeatures );
$formToolbars = [
"ckedit_toolbars" => [
"label" => "Toolbar Set",
"note" => 'The toolbar set to use. "All" includes functionality not supported by Bitweaver. Use at your own risk!',
],
];
$gBitSmarty->assign( "formToolbars", $formToolbars );
$gBitSmarty->assign( "formToolbarChoices", ["Basic", "Intermediate", "Advanced", "Full"]);
// Skin
$formSkin = [
"ckedit_skin" => [
"label" => "Skin",
"note" => "The skin to use.",
],
];
$gBitSmarty->assign( "formSkin", $formSkin );
$skins = array_flip( scandir( CKEDITOR_PKG_PATH."skins/" ) );
foreach( [ ".", ".." ] as $dir ) {
if( isset( $skins[$dir] ) ) {
unset( $skins[$dir] );
}
}
$gBitSmarty->assign( "formSkinChoices", array_keys( $skins ) );
if( !empty( $_REQUEST["change_prefs"] ) ) {
foreach( $formCkeditorFeatures as $item => $data ) {
simple_set_toggle( $item, CKEDITOR_PKG_NAME );
}
$ckeditorSets = [ ...$formToolbars , ...$formSkin];
foreach( $ckeditorSets as $item => $data ) {
simple_set_value( $item, CKEDITOR_PKG_NAME );
}
}