mirror of https://github.com/logos-co/open-law.git
move quill.js to src
This commit is contained in:
parent
6c87a5bd0e
commit
f6dad4360e
|
@ -0,0 +1 @@
|
|||
export declare function initQuill(): void;
|
17572
app/static/js/main.js
17572
app/static/js/main.js
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
export declare function initQuill(): void;
|
||||
export declare function initQuillValueToTextArea(): void;
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
export declare function initContributors(): void;
|
|
@ -0,0 +1 @@
|
|||
export declare function initQuill(): void;
|
|
@ -0,0 +1 @@
|
|||
import './styles.css';
|
|
@ -0,0 +1 @@
|
|||
export declare function initQuill(): void;
|
|
@ -0,0 +1 @@
|
|||
export declare function initQuillValueToTextArea(): void;
|
|
@ -93,29 +93,6 @@
|
|||
{% endblock %}
|
||||
<!-- scripts -->
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
<script src="{{ url_for('static', filename='js/quill.js') }}"></script>
|
||||
|
||||
<script>
|
||||
var toolbarOptions = [
|
||||
['bold', 'italic', 'underline'],
|
||||
[{list: 'ordered'}, {list: 'bullet'}],
|
||||
[{header: [1, 2, 3, 4, 5, 6, false]}],
|
||||
[{indent: '-1'}, {indent: '+1'}],
|
||||
[{align: []}],
|
||||
['clean'],
|
||||
];
|
||||
const editorElement = document.querySelector('#editor');
|
||||
if (editorElement) {
|
||||
var quill = new Quill('#editor', {
|
||||
theme: 'snow',
|
||||
modules: {
|
||||
toolbar: toolbarOptions,
|
||||
},
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
{% block scripts %} {% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
const Quill = require('./quill');
|
||||
|
||||
export function initQuill() {
|
||||
var toolbarOptions = [
|
||||
['bold', 'italic', 'underline'],
|
||||
[{list: 'ordered'}, {list: 'bullet'}],
|
||||
[{header: [1, 2, 3, 4, 5, 6, false]}],
|
||||
[{indent: '-1'}, {indent: '+1'}],
|
||||
['clean'],
|
||||
];
|
||||
const editorElement = document.querySelector('#editor');
|
||||
if (editorElement) {
|
||||
var quill = new Quill('#editor', {
|
||||
theme: 'snow',
|
||||
modules: {
|
||||
toolbar: toolbarOptions,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
|
@ -1,10 +1,12 @@
|
|||
import './styles.css';
|
||||
import {initBooks} from './books';
|
||||
import {initContributors} from './contributors';
|
||||
import {initQuill} from './quill_value_to_textarea';
|
||||
import {initQuill} from './initQuill';
|
||||
import {initQuillValueToTextArea} from './quill_value_to_textarea';
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
initBooks();
|
||||
initContributors();
|
||||
initQuill();
|
||||
initQuillValueToTextArea();
|
||||
});
|
||||
|
|
|
@ -3,13 +3,10 @@ const quill_value_to_textarea = (): undefined => {
|
|||
const qlEditor: HTMLButtonElement = document.querySelector('.ql-editor');
|
||||
const editorContent = qlEditor.innerHTML;
|
||||
aboutInput.value = editorContent;
|
||||
|
||||
console.log(editorContent);
|
||||
|
||||
return undefined;
|
||||
};
|
||||
|
||||
export function initQuill() {
|
||||
export function initQuillValueToTextArea() {
|
||||
const qlEditor: HTMLButtonElement = document.querySelector('.ql-editor');
|
||||
|
||||
if (!qlEditor) {
|
||||
|
|
Loading…
Reference in New Issue