Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
5 ตอบกลับ
11164 มุมมอง

I don't find anything on google if there is a way to use on a textarea in a website form the same text editor that is in the back end for html fields. 

Is it possible to use that WYSIWYG text editor in a website form? If it's possible, how to use it?

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

Had to copy paste the js code from website_forum module for the textarea.load_editor. Then add the js to assets_frontend.

After that I just added the class load_editor to textarea and summernote started working.

<textarea class="form_control load_editor"

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Yes, we can.The best example is, odoo using the

WYSIWYG editor here in the forum. https://summernote.org/ you can integrate other editors also.
Widget:-
<field name="body_html" widget="html_frame"/>
อวตาร
ละทิ้ง
ผู้เขียน

Thanks... I'm looking at the website_forum and web_editor addons. Is there a simpler web addon than the forum to figure out how summernote works? I don't know js so I'm a bit out of my zone here.

I updated the answer.

ผู้เขียน

Not in the back end... I need in a website template for a <textarea></textarea>. In the back_end I know to just add widget=html to the Text fields

Related Posts ตอบกลับ มุมมอง กิจกรรม
5
ก.พ. 24
24183
0
ก.ค. 21
1847
0
ก.ค. 18
2666
2
ก.ค. 18
3071
2
พ.ย. 17
4560