blob: 86264b9c83abb623c069028d8bd4a23363d295af (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
@extends('template')
@section('head')
<meta charset="UTF-8">
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<script type = "module" src = "/js/writing_create.js"></script>
<link rel="stylesheet" href="/css/style.css">
<link rel="stylesheet" href="/css/writings.css">
@endsection
@section('content')
<main>
<div class = "writing-create">
<form id="writing-form" method="POST" action="/w">
@csrf
<div class="form-group">
<label for="title">Title</label>
<input type="text" name="title" id="title" class="form-control" required value="{{ old('title') }}">
@error('title')
<div class="error-message">{{ $message }}</div>
@enderror
</div>
<div class="editor-container">
<div class="editor-section">
<div class="content-header">
<label for="input_content">Content (Markdown)</label>
<a href="https://www.markdownguide.org/cheat-sheet/" target="_blank" class="markdown-help">Markdown Cheatsheet ↗</a>
</div>
<textarea name="content" id="input_content" class="form-control" rows="20">{{ old('content') }}</textarea>
@error('content')
<div class="error-message">{{ $message }}</div>
@enderror
</div>
<div class="preview-section">
<label>Preview</label>
<div id="content_preview" class="preview-content"></div>
</div>
</div>
<button type="submit" class="submit-btn">Publish Writing</button>
</form>
<div style = "margin-left: 7rem; width: 20%">
<b>Find and Replace</b>
<input type="text" id="input_findstr" placeholder="Find (regex)">
<input type="text" id="input_replacestr" placeholder="Replace with"><br>
<input type="checkbox" id = "input_multiline" >Multi-line</input>
<button id="button_replace">Replace</button>
<button id="button_undo">Undo</button>
</div>
</div>
</main>
@endsection
|