Editor (Quill)
Your powerful rich text editor.
Quill documentationBasic usage
Add the data-quill
attribute to a <div>
.
<div class="h-200px" data-quill></div>
Minimal
You can modify the default layout by overriding it through the data-quill
attribute. You can also define placeholder text.
<div class="h-200px" data-quill='{
"modules": {
"toolbar": [
[{"header": [1, 2, false] }],
["bold", "italic", "underline"]
]
},
"placeholder" : "Compose an epic..."
}'></div>
Modal example
It works in modal, of course.
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal">
Open modal
</button>
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title" id="exampleModalLabel">Text editor</h3>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form action="#">
<div data-quill class="h-200px"></div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-light" data-bs-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
<!-- End Modal -->
By using code splitting and dynamic import techniques you don't need to worry about the size of the JavaScript file. Dashly will only import the necessary files when they are needed.