Magento - add WYSIWYG editor to custom widget

前端 未结 4 1734
南方客
南方客 2021-01-02 17:30

I created a widget inside my custom module. Everything is working and the widget can be embedded onto CMS pages. However, instead of a textarea parameter type I want to add

4条回答
  •  隐瞒了意图╮
    2021-01-02 17:38

    Based on Rouzbeh I added small jQuery code that validate if double quotes are used:

    
    
    jQuery("#widget_options textarea").keyup(function(){
    if(jQuery(this).val().indexOf('"') > -1){
      jQuery(this).val(jQuery(this).val().replace('"',"'"));
      alert('No double quotes allowed, use single quotes instead.')
    }
    });
    
    ]]>                
     
    

提交回复
热议问题