use new behaviors adminPostEditorTags
This commit is contained in:
parent
4c6eef040f
commit
0cf94448ea
2 changed files with 17 additions and 1 deletions
|
@ -67,6 +67,7 @@ class Backend extends dcNsProcess
|
|||
'adminBeforeBlogSettingsUpdate' => [BackendBehaviors::class, 'adminBeforeBlogSettingsUpdate'],
|
||||
// post
|
||||
'adminPostHeaders' => [BackendBehaviors::class, 'adminPostHeaders'],
|
||||
'adminPostEditorTags' => [BackendBehaviors::class, 'adminPostEditorTags'],
|
||||
'adminPostFormItems' => [BackendBehaviors::class, 'adminPostFormItems'],
|
||||
'adminAfterPostUpdate' => [BackendBehaviors::class, 'adminAfterPostSave'],
|
||||
'adminAfterPostCreate' => [BackendBehaviors::class, 'adminAfterPostSave'],
|
||||
|
|
|
@ -156,10 +156,25 @@ class BackendBehaviors
|
|||
$editor = dcCore::app()->auth->getOption('editor');
|
||||
|
||||
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');
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue