Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
1828 Lượt xem

Hello, I tried to use the website module and started noticing that Odoo text font size max only 62 px. What if I want to have more than 62 px? Can I change this? 

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hello @mike chen


Hope you are doing well.


Yes, you can change the font size above 62px in Inline Text.


First you need to inherit web_editor preserve template.

Please find code in comment. 

Hope it will be helpful to you.

Thanks & Regards,
Email: odoo@aktivsoftware.com 

Skype: kalpeshmaheshwari

Ảnh đại diện
Huỷ bỏ

Please find code here :-

file path like:

static/src/xml/editor.xml

editor.xml

<?xml version="1.0" encoding="UTF-8"?>
<template id="template" xml:space="preserve">
<t t-name="web_editor.toolbar" t-extend="web_editor.toolbar">
<t t-jquery='div[id="font-size"] ul' t-operation='append'>
<!-- here set 66px font size.
take data-arg1="66px" -->
<li><a class="dropdown-item custom_font_size" href="#" data-call="setFontSize" data-arg1="66px">66</a></li>
</t>
</t>
</template>

After add this file in module you need to link this file in manifest

like,
'assets': {
'web_editor.assets_wysiwyg': [
'your_module_name/static/src/xml/editor.xml',
],
}

Bài viết liên quan Trả lời Lượt xem Hoạt động
4
thg 12 23
4042
0
thg 11 23
1289
2
thg 6 24
6352
2
thg 4 23
2545
2
thg 4 23
3139