コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
4240 ビュー

Hello

I am trying to add a new button in "editorbar", inheriting web_editor, but without having any result, this is my qweb code:

<?xml version="1.0" encoding="utf-8"?>
<templates id="template" xml:space="preserve">
    <t t-extend="web_editor.editorbar">
        <t t-jquery=".btn btn-primary btn-xs" t-operation="before">
            <span>OK</span>
            <a href="#" data-action="custom_action" class="btn btn-primary btn-xs">Custom Action</a>
        </t>
    </t>
</templates>


Can someone give me a hand, thank you.

アバター
破棄
最善の回答

Since version 9.0 web_editor is based on Summernote (version 6.x I guess) See https://summernote.org/

Odoo integration change various things, notably the config which is in the file web_editor/static/src/js/backend.js That means that you must load your changes and templates with Javascript. 

Look at the OCA web_editor_background_color module for a sample.

アバター
破棄
関連投稿 返信 ビュー 活動
1
7月 25
1712
1
5月 25
1709
1
4月 25
2281
1
2月 25
1566
0
10月 24
1322