Temp fix for edit styling

This commit is contained in:
2026-01-22 21:20:09 +01:00
parent 4eaec5c7b1
commit e306226ac8
3 changed files with 58 additions and 0 deletions

View File

@@ -18,6 +18,12 @@ class action_plugin_luxtools extends ActionPlugin
$this,
"addScripts",
);
$controller->register_hook(
"CSS_STYLES_INCLUDED",
"BEFORE",
$this,
"addTemporaryInputStyles",
);
$controller->register_hook(
"TOOLBAR_DEFINE",
"AFTER",
@@ -52,6 +58,26 @@ class action_plugin_luxtools extends ActionPlugin
}
}
/**
* Include temporary global input styling via css.php so @ini_* placeholders resolve.
*
* @param Event $event
* @param mixed $param
* @return void
*/
public function addTemporaryInputStyles(Event $event, $param)
{
if (!isset($event->data['mediatype']) || $event->data['mediatype'] !== 'screen') {
return;
}
if (!isset($event->data['files']) || !is_array($event->data['files'])) {
return;
}
$event->data['files'][DOKU_PLUGIN . 'luxtools/temp-input-colors.css'] = DOKU_BASE . 'lib/plugins/luxtools/';
}
/**
* Add custom toolbar button for code blocks.
*