Thursday 21 February 2019

Add Wyswing editor in Frontend in Magento2.3

Added the Following code in .phtml file

<textarea id="presonal_message"  name="presonal-message"></textarea>

<script>
    require([
    "jquery",
    "mage/translate",
    "mage/adminhtml/events",
    "mage/adminhtml/wysiwyg/tiny_mce/setup"
    ], function(jQuery){
        wysiwygcompany_description = new wysiwygSetup("presonal_message", {
            "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>



No comments:

Post a Comment

Product Collection with out of stock and In Stock in Magento 2

Product collection with out of stock and In stock. use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory; $collection = $th...