You can easily prefill content in your MUDS editor like so: content: 'content goes here'.
<!-- Include the MUDS stylesheet --> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/muds.min.css"> <!-- Create the editor container --> <div id="editor">I am prefilled content... Woohoo...!</div> <!-- Include the MUDS library --> <script src="https://cdn.jsdelivr.net/npm/[email protected]/muds.min.js"></script> <!-- Initialize MUDS editor --> <script> var muds = new muds({ selector: 'editor', }); </script>
The default name for the submittable textarea is "muds-submit". This can be easily overwritten like so: submitName: 'my_submit_name'.
<!-- Include the MUDS stylesheet --> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/muds.min.css"> <!-- Create the editor container --> <textarea id="editor"></textarea> <!-- Include the MUDS library --> <script src="https://cdn.jsdelivr.net/npm/[email protected]/muds.min.js"></script> <!-- Initialize MUDS editor --> <script> var muds = new muds({ selector: 'editor', submitName: 'my_submit_name' }); </script>
Content in the textarea is not required by default, bu can be enabled like so: required: true.
<!-- Include the MUDS stylesheet --> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/muds.min.css"> <!-- Create the editor container --> <textarea id="editor"></textarea> <!-- Include the MUDS library --> <script src="https://cdn.jsdelivr.net/npm/[email protected]/muds.min.js"></script> <!-- Initialize MUDS editor --> <script> var muds = new muds({ selector: 'editor', required: true }); </script>