require is not defined javascript
npm install -g browserify
remove "type": "module" from package.json <script>
define([
"jquery",
"mage/translate",
"mage/adminhtml/events",
"mage/adminhtml/wysiwyg/tiny_mce/setup"
], function(jQuery){
wysiwygCompanyDescription = new wysiwygSetup("company_description", {
"width":"100%",
"height":"200px",
"plugins":[{"name":"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",
}
});
wysiwygCompanyDescription.setup("exact");
});
</script>
Also in JavaScript:
- how to export module in node js
- javascript get elements that exist in two arrays
- how to redirect to another page in javascript on submit type
- javascript is number an integer
- jquery check if click to this self not this child
- javascript truncate array
- pug to html
- get element by id in javascript
- javascript select input text on focus
- take a screen shot of a image within a div using js
- get multiple checkbox value in javascript
- js detect all images errors
- watchman watch-del-all, and react-native start --reset-cache
- check if a key exists in an object javascript
- javascript input onchange get value
- how to delete an element of an array in javascript
- how to set up a success message show up if form is submitted in react hooks
- js split string on capital letter second
- unban command discord.js v12
- bootstrap show modal on page load
- change windlow location relitave to current one
- best js method
- how to turn a number negative in javascript
- javascript go to previous page