Editor Content

You can easily prefill content in your MUDS editor like so: content: 'content goes here'.


Example:


                    

                    
<!-- Include the MUDS stylesheet -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/muds-editor@1.6.0/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/muds-editor@1.6.0/muds.min.js"></script>

<!-- Initialize MUDS editor -->
<script>
var muds = new muds({
    selector: 'editor',
});
</script>
                    

Textarea Name

The default name for the submittable textarea is "muds-submit". This can be easily overwritten like so: submitName: 'my_submit_name'.


Example:


                    

                    
<!-- Include the MUDS stylesheet -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/muds-editor@1.6.0/muds.min.css">

<!-- Create the editor container -->
<textarea id="editor"></textarea>

<!-- Include the MUDS library -->
<script src="https://cdn.jsdelivr.net/npm/muds-editor@1.6.0/muds.min.js"></script>

<!-- Initialize MUDS editor -->
<script>
var muds = new muds({
    selector: 'editor',
    submitName: 'my_submit_name'
});
</script>
                    

Required parameter

Content in the textarea is not required by default, bu can be enabled like so: required: true.


Example:


                    

                    
<!-- Include the MUDS stylesheet -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/muds-editor@1.6.0/muds.min.css">

<!-- Create the editor container -->
<textarea id="editor"></textarea>

<!-- Include the MUDS library -->
<script src="https://cdn.jsdelivr.net/npm/muds-editor@1.6.0/muds.min.js"></script>

<!-- Initialize MUDS editor -->
<script>
var muds = new muds({
    selector: 'editor',
    required: true
});
</script>