diff --git a/htdocs/class/xoopseditor/dhtmltextarea/XoopsDhtmlToolbar.php b/htdocs/class/xoopseditor/dhtmltextarea/XoopsDhtmlToolbar.php new file mode 100644 index 000000000..7ebc34ea4 --- /dev/null +++ b/htdocs/class/xoopseditor/dhtmltextarea/XoopsDhtmlToolbar.php @@ -0,0 +1,398 @@ +`, the preview + * fieldset, and the JS loader shim). + * + * The markup is framework-neutral: it uses its own `xo-edtb-*` classes (styled by + * `assets/toolbar.css`, driven by CSS custom properties) instead of Bootstrap/DaisyUI classes, so + * it renders identically whether or not a CSS framework is loaded — the admin themes load none. + * + * {@see self::renderCodeButtons()}, {@see self::renderTypography()} and + * {@see self::renderCheckLength()} are `public`, not `protected`: five unrelated renderer classes + * (not subclasses of this one) need to call them directly to build their thin + * `renderFormDhtmlTAXoopsCode()`/`renderFormDhtmlTATypography()` delegates, and PHP's `protected` + * only allows access from the same class or a subclass. They remain overridable by a subclass that + * wants to adjust a single row. + * + * @category XoopsEditor + * @package XoopsDhtmlToolbar + * @author XOOPS Project + * @copyright 2000-2026 XOOPS Project (https://xoops.org) + * @license GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html) + * @link https://xoops.org + */ +class XoopsDhtmlToolbar +{ + /** @var string Base button class */ + private const BTN = 'xo-edtb-btn'; + + /** @var string Small button class (button row / dropdown toggles) */ + private const BTN_SM = 'xo-edtb-btn xo-edtb-btn-sm'; + + /** @var string Class for a role="group" cluster of related buttons */ + private const GROUP_CLASS = 'xo-edtb-group'; + + /** @var string Class for the outer role="toolbar" container */ + private const TOOLBAR_CLASS = 'xo-edtb-toolbar'; + + /** @var string Class for a
based dropdown */ + private const DROPDOWN_CLASS = 'xo-edtb-dropdown'; + + /** @var string Class for a dropdown's