Topic: WYSIWYG plugin with form

efilippi priority asked 3 years ago


I use the WYSIWYG editor.

How can I have 2 WYSIWYG text areas in a form that will use standard POST submission (no ajax) ?

It seems that there's no way to distinguish the 2 textareas, no id and no name are generated by the plugin, so the POST sends an empty value

here is the $_POST I get ([vide] => vide for the textarea genberated by the wysiwyg editor) :

    [eljFormId] => professeurs_fr
    [vide] => vide
    [eljx_check_group] => 
    [eljx_check_group_301] => 301
    [eljx_check_group_321] => 321
    [Objet] => l'objet d'eric
    [Envoyer_Id] => Envoyer
    [Envoyer] => Envoyer

please help me with the way to do so.



efilippi priority answered 3 years ago


thank you, this helps me.

But the pluging built texarea still as no name. So I need to add another texarea with a name attribute and copy the value in it, just like this :

This results in 2 textareas for the same use.

I think an easy way to be fully compatible with forms would be to modify the plugin adding a name attribute to the wysiwyg div, and let the plugin build its textarea with the same name, so it would pass the data correctly during form submit

<div class="first-area">
    <div class="wysiwyg" name="first-area" data-mdb-wysiwyg="wysiwyg">

html result after pluging run would be (suggestion) :

<div class="first-area">
    <textarea class="wysiwyg-textarea" name="first-area" ></textarea>
    <div class="wysiwyg" name="first-area" data-mdb-wysiwyg="wysiwyg" data-mdb-uuid="430a350c-311e-4d65-a8ae-a1338d519b5e"><div class="wysiwyg-toolbar btn-toolbar " style="top: 0px" role="toolbar" aria-label="Toolbar with button groups">
    <div class="wysiwyg-toolbar-group"> [...] </div>
    </div><div class="wysiwyg-content" contenteditable="true"></div></div>

This could be suggested to the dev team


Dawid Wajszczuk staff answered 3 years ago


I have added this to our ideas list and maybe we will add this functionality.

Keep coding,

Michał Duszak staff answered 3 years ago

Hello, WYSIWYG editor is not a part of Forms, but you can build a custom form. To distinguish one editor from another, wrap one into a parent, e.g.:

<div class="first-area">
    <div class="wysiwyg" data-mdb-wysiwyg="wysiwyg">

Then you can use '.first-area .wysiwyg-content' selector to build a custom form.

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 3.4.0
  • Device: laptop
  • Browser: firefox
  • OS: Debian
  • Provided sample code: No
  • Provided link: No