blob: 9e42ba9d6c961e430270d74a1fdf4463ad4a62e1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
<div class="container">
<h1 class="mt-2">{{ title }}</h1>
<form action="/new-post" method="post" accept-charset="utf-8">
<div class="mb-3">
<label for="post_title" class="form-label">Post title:</label>
<input name="title" type="text" class="form-control" id="post_title" required>
</div>
<div class="mb-3">
<label for="post_text" class="form-label">Post text:</label>
<textarea name="text" class="form-control" id="post_text"></textarea>
</div>
<button type="submit" class="btn">Submit</button>
</form>
</div>
<script src="https://cdn.ckeditor.com/ckeditor5/27.1.0/classic/ckeditor.js"></script>
<script>
ClassicEditor
.create(document.querySelector('#post_text'))
.catch(error => console.error(error));
</script>
|