mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[ADD] web_editor_class_selector: new module to add custom CSS in HTML editor.
This module allows users to create custom CSS classes, which can then be selected and applied directly in the HTML editor.
This commit is contained in:
33
web_editor_class_selector/static/src/xml/web_editor.xml
Normal file
33
web_editor_class_selector/static/src/xml/web_editor.xml
Normal file
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
<t t-name="web_editor_class_selector.custom_class_css">
|
||||
<t t-jquery="#decoration" t-operation="before">
|
||||
|
||||
<div id="custom_class" class="btn-group dropdown">
|
||||
<button
|
||||
type="button"
|
||||
class="btn dropdown-toggle"
|
||||
data-bs-toggle="dropdown"
|
||||
title="Custom CSS"
|
||||
tabindex="-1"
|
||||
data-bs-original-title="Custom CSS"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<span>Custom CSS</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li t-foreach="custom_class_css" t-as="line">
|
||||
<a
|
||||
class="dropdown-item css_selector"
|
||||
t-att-id="line.class_name"
|
||||
href="#"
|
||||
data-call="setCustomCss"
|
||||
t-att-data-arg1="line.id"
|
||||
><span t-att-class="line.class_name" t-out="line.name" /></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
</t>
|
||||
</templates>
|
||||
Reference in New Issue
Block a user