[ 
https://issues.apache.org/jira/browse/OFBIZ-13224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17946660#comment-17946660
 ] 

ASF subversion and git services commented on OFBIZ-13224:
---------------------------------------------------------

Commit 0a3a8abd5f0ed6aa35feff6d6479af96240ee05c in ofbiz-plugins's branch 
refs/heads/trunk from Florian Motteau
[ https://gitbox.apache.org/repos/asf?p=ofbiz-plugins.git;h=0a3a8abd5 ]

Improved: Adapt existing forms to Trumbowyg visual editor (OFBIZ-13224)



In OFBIZ-10093, the rich text editor elRTE was replaced by Trumbowyg, but the 
visual-editor-buttons attribute on the textarea field was not adapted. The 
Trumbowyg configuration is hard coded in OfbizUtil.js, instead of using this 
attribute to control the editor functionalities :

https://github.com/apache/ofbiz-framework/blob/1cfef45f89d2714fef1a94729fa48f554be75c6e/themes/common-theme/webapp/common-theme/js/util/OfbizUtil.js#L149

We should either remove the visual-editor-buttons attribute, or use its value 
to configure Trumbowyg.

Trumbowyg does not support presets like "basic" or "complete" (like elRTE 
does), it needs a definition of toolbars as a 2 dimensions string array. We 
could simply provide this array in visual-editor-buttons attribute, and pass it 
to Trumbowyg.


> Support visual-editor-buttons attribute on textareas
> ----------------------------------------------------
>
>                 Key: OFBIZ-13224
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-13224
>             Project: OFBiz
>          Issue Type: Improvement
>    Affects Versions: 18.12.18, 24.09.01
>            Reporter: Florian Motteau
>            Priority: Minor
>         Attachments: screenshot-1.png, screenshot-2.png
>
>
> In OFBIZ-10093, the rich text editor elRTE was replaced by Trumbowyg, but the 
> visual-editor-buttons attribute on the textarea field was not adapted. The 
> Trumbowyg configuration is hard coded in OfbizUtil.js, instead of using this 
> attribute to control the editor functionalities :
> https://github.com/apache/ofbiz-framework/blob/1cfef45f89d2714fef1a94729fa48f554be75c6e/themes/common-theme/webapp/common-theme/js/util/OfbizUtil.js#L149
> We should either remove the visual-editor-buttons attribute, or use its value 
> to configure Trumbowyg.
> Trumbowyg does not support presets like "basic" or "complete" (like elRTE 
> does), [it needs a definition of toolbars as a 2 dimensions string 
> array|https://alex-d.github.io/Trumbowyg/documentation/#button-pane]. We 
> could simply provide this array in visual-editor-buttons attribute, and pass 
> it to Trumbowyg.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to