fix message editor
This commit is contained in:
parent
bb69a88a9c
commit
9609e9716e
@ -5,7 +5,6 @@ $(() => {
|
|||||||
if (typeof jsToolBar === 'function') {
|
if (typeof jsToolBar === 'function') {
|
||||||
$('#disclaimer_text').each(function () {
|
$('#disclaimer_text').each(function () {
|
||||||
const tbWidgetTextDisclaimer = new jsToolBar(this);
|
const tbWidgetTextDisclaimer = new jsToolBar(this);
|
||||||
tbWidgetTextDisclaimer.context = 'disclaimer_text';
|
|
||||||
tbWidgetTextDisclaimer.draw('xhtml');
|
tbWidgetTextDisclaimer.draw('xhtml');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Dotclear\Plugin\disclaimer;
|
namespace Dotclear\Plugin\disclaimer;
|
||||||
|
|
||||||
|
use ArrayObject;
|
||||||
use dcCore;
|
use dcCore;
|
||||||
use dcPage;
|
use dcPage;
|
||||||
use dcNsProcess;
|
use dcNsProcess;
|
||||||
@ -70,15 +71,13 @@ class Backend extends dcNsProcess
|
|||||||
},
|
},
|
||||||
|
|
||||||
'adminBlogPreferencesHeaders' => function (): string {
|
'adminBlogPreferencesHeaders' => function (): string {
|
||||||
// nullsafe PHP < 8.0
|
return dcPage::jsModuleLoad(My::id() . '/js/backend.js');
|
||||||
if (is_null(dcCore::app()->auth)) {
|
},
|
||||||
return '';
|
|
||||||
}
|
|
||||||
$editor = dcCore::app()->auth->getOption('editor');
|
|
||||||
|
|
||||||
return
|
'adminPostEditorTags' => function (string $editor, string $context, ArrayObject $alt_tags, string $format): void {
|
||||||
dcCore::app()->callBehavior('adminPostEditor', $editor['xhtml'], 'disclaimer', ['#disclaimer_text'], 'xhtml') .
|
if ($context == 'blog_desc') {
|
||||||
dcPage::jsModuleLoad(My::id() . '/js/backend.js');
|
$alt_tags->append('#disclaimer_text');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
'adminBlogPreferencesFormV2' => function (dcSettings $blog_settings): void {
|
'adminBlogPreferencesFormV2' => function (dcSettings $blog_settings): void {
|
||||||
|
Loading…
Reference in New Issue
Block a user