feat: Editor auf Quill 2.0.2 aktualisiert, Sticky Toolbar & Tabellen-Funktion hinzugefügt
All checks were successful
Docker Build & Push / build-and-push (push) Successful in 34s
All checks were successful
Docker Build & Push / build-and-push (push) Successful in 34s
This commit is contained in:
31
scratch2.html
Normal file
31
scratch2.html
Normal file
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link href="https://cdn.jsdelivr.net/npm/quill@2.0.2/dist/quill.snow.css" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="editor"></div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/quill@2.0.2/dist/quill.js"></script>
|
||||
<script>
|
||||
var quill = new Quill('#editor', {
|
||||
theme: 'snow',
|
||||
modules: {
|
||||
table: true,
|
||||
toolbar: {
|
||||
container: [
|
||||
['bold', 'italic'],
|
||||
['table', 'table-insert-row', 'table-insert-col', 'table-delete-row', 'table-delete-col']
|
||||
],
|
||||
handlers: {
|
||||
'table': function() { this.quill.getModule('table').insertTable(2, 2); },
|
||||
'table-insert-row': function() { this.quill.getModule('table').insertRowBelow(); },
|
||||
'table-insert-col': function() { this.quill.getModule('table').insertColumnRight(); },
|
||||
'table-delete-row': function() { this.quill.getModule('table').deleteRow(); },
|
||||
'table-delete-col': function() { this.quill.getModule('table').deleteColumn(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user