42 lines
1.5 KiB
PHP
42 lines
1.5 KiB
PHP
<!-- Include stylesheet https://quilljs.com/docs/quickstart-->
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Example with Quill.js</title>
|
|
<link href="https://cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet">
|
|
</head>
|
|
<body>
|
|
<div class="editor"></div>
|
|
<script src="https://cdn.quilljs.com/1.3.6/quill.js"></script>
|
|
<script>
|
|
var toolbarOptions = [
|
|
[{ 'font': [] }],
|
|
[{ 'header': [1, 2, 3, 4, 5, 6, false] }],
|
|
['bold', 'italic', 'underline', 'strike'], // toggled buttons
|
|
['blockquote', 'code-block'],
|
|
|
|
[{ 'header': 1 }, { 'header': 2 }], // custom button values
|
|
[{ 'list': 'ordered'}, { 'list': 'bullet' }],
|
|
[{ 'script': 'sub'}, { 'script': 'super' }], // superscript/subscript
|
|
[{ 'indent': '-1'}, { 'indent': '+1' }], // outdent/indent
|
|
[{ 'direction': 'rtl' }], // text direction
|
|
|
|
[{ 'color': [] }, { 'background': [] }], // dropdown with defaults from theme
|
|
[{ 'align': [] }],
|
|
|
|
['clean'], // remove formatting button
|
|
['link', 'image', 'video'] // link and image, video
|
|
];
|
|
|
|
var quill = new Quill('.editor', {
|
|
modules: {
|
|
toolbar: toolbarOptions
|
|
},
|
|
theme: 'snow' // or 'bubble'
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|