This is an automated email from the ASF dual-hosted git repository.

nmalin pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 0a3a8abd5 Improved: Adapt existing forms to Trumbowyg visual editor 
(OFBIZ-13224)
0a3a8abd5 is described below

commit 0a3a8abd5f0ed6aa35feff6d6479af96240ee05c
Author: Florian Motteau <florian.mott...@nereide.fr>
AuthorDate: Wed Apr 23 10:40:11 2025 +0200

    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.
---
 ecommerce/widget/ForumForms.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ecommerce/widget/ForumForms.xml b/ecommerce/widget/ForumForms.xml
index c73ac5602..ea68e8e80 100644
--- a/ecommerce/widget/ForumForms.xml
+++ b/ecommerce/widget/ForumForms.xml
@@ -33,7 +33,7 @@ under the License.
         <field name="pubPtContentId"><hidden 
value="${parameters.forumId}"/></field>
         <field name="contentAssocTypeId"><hidden 
value="${contentAssoc.contentAssocTypeId}"/></field>
         <field name="textData" map-name="dummy">
-        <textarea  rows="10" visual-editor-enable="false" 
visual-editor-buttons="compact"/>
+        <textarea rows="10"/>
         </field>
         <field name="addButton" title="${uiLabelMap.CommonAdd}" 
widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>

Reply via email to