use new behaviors adminPostEditorTags
parent
4c6eef040f
commit
0cf94448ea
|
@ -67,6 +67,7 @@ class Backend extends dcNsProcess
|
||||||
'adminBeforeBlogSettingsUpdate' => [BackendBehaviors::class, 'adminBeforeBlogSettingsUpdate'],
|
'adminBeforeBlogSettingsUpdate' => [BackendBehaviors::class, 'adminBeforeBlogSettingsUpdate'],
|
||||||
// post
|
// post
|
||||||
'adminPostHeaders' => [BackendBehaviors::class, 'adminPostHeaders'],
|
'adminPostHeaders' => [BackendBehaviors::class, 'adminPostHeaders'],
|
||||||
|
'adminPostEditorTags' => [BackendBehaviors::class, 'adminPostEditorTags'],
|
||||||
'adminPostFormItems' => [BackendBehaviors::class, 'adminPostFormItems'],
|
'adminPostFormItems' => [BackendBehaviors::class, 'adminPostFormItems'],
|
||||||
'adminAfterPostUpdate' => [BackendBehaviors::class, 'adminAfterPostSave'],
|
'adminAfterPostUpdate' => [BackendBehaviors::class, 'adminAfterPostSave'],
|
||||||
'adminAfterPostCreate' => [BackendBehaviors::class, 'adminAfterPostSave'],
|
'adminAfterPostCreate' => [BackendBehaviors::class, 'adminAfterPostSave'],
|
||||||
|
|
|
@ -156,10 +156,25 @@ class BackendBehaviors
|
||||||
$editor = dcCore::app()->auth->getOption('editor');
|
$editor = dcCore::app()->auth->getOption('editor');
|
||||||
|
|
||||||
return
|
return
|
||||||
dcCore::app()->callBehavior('adminPostEditor', $editor['xhtml'], 'pwt', ['#post_wtext'], 'xhtml') .
|
//dcCore::app()->callBehavior('adminPostEditor', $editor['xhtml'], 'pwt', ['#post_wtext'], 'xhtml') .
|
||||||
dcPage::jsModuleLoad(My::id() . '/js/backend.js');
|
dcPage::jsModuleLoad(My::id() . '/js/backend.js');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add editor to post tags.
|
||||||
|
*
|
||||||
|
* @param string $editor The editor name (ie dcCKEditor)
|
||||||
|
* @param string $context The editor context (ie post)
|
||||||
|
* @param ArrayObject $alt_tags The editor target (ie textarea id)
|
||||||
|
* @param string $format The editor format (ie xhtml)
|
||||||
|
*/
|
||||||
|
public static function adminPostEditorTags(string $editor, string $context, ArrayObject $alt_tags, string $format): void
|
||||||
|
{
|
||||||
|
if ($context == 'post') {
|
||||||
|
$alltgas[] = '#post_wtext';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add widget text form to post edition page.
|
* Add widget text form to post edition page.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue