Back to Top

Add WYSIWYG Editor at Front End in Magento2.3

Updated 28 February 2024

Add WYSIWYG Editor at Front End in Magento2.3:-  In this blog I’ll explain you that how we can add editor at front end in magento2.3 version.

For magento2.2 or less version please follow this blog

So, First of all you have to create a text area field like below.

<textarea id="company_description" name="company_description">
</textarea>

Then add below script to load jQuery and WYSIWYG editor and then assign to
textarea having id company_description.

<script>
    require([
    "jquery", 
    "mage/translate", 
    "mage/adminhtml/events", 
    "mage/adminhtml/wysiwyg/tiny_mce/setup"
    ], function(jQuery){
        wysiwygcompany_description = new wysiwygSetup("company_description", {
            "width":"99%",  // defined width of editor
            "height":"200px", // height of editor
            "plugins":[{"name":"image"}], // for image
            "tinymce4":{"toolbar":"formatselect | bold italic underline | alignleft aligncenter alignright | bullist numlist | link table charmap","plugins":"advlist autolink lists link charmap media noneditable table contextmenu paste code help table",
            }
        });
        wysiwygcompany_description.setup("exact");
    });
</script>

Now you can see editor on textarea field at front end

Searching for an experienced
Magento 2 Company ?
Find out More
editor

In this way we can add editor at front end in magento 2.3 version. Hope it will be helpful for you.

Thanks and if have any query then comment below.

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


9 comments

  • Neeraj
    • ashutosh srivastava (Moderator)
  • Sagar Vasani
    • Rani Priya (Moderator)
      • Sagar Vasani
        • Rani Priya (Moderator)
          • Sagar Vasani
          • Rani Priya (Moderator)
          • Sagar Vasani
  • Back to Top

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home