[ === main === ]
	[ ' dummy | default * // ADD_NO_DIV ' ]<div id="page-edit">
		[ ' message ' ]
		[ ' warning ' ]
		[= f _ =
			[= l _ =
				<div class="page-properties">[ ' accessmode ' ]<br><br>
				<span title="[ ' language ' ]">[ ' lang ' ]&nbsp;&nbsp;</span></div>
			=]
			[= p _ =
				[ '' buttons '' ]
				<section id="preview" class="preview">
					<p class="preview"><span>[ ' _t: Preview ' ] ([ ' chars ' ] [ ' _t: Chars ' ])</span></p>
					<h[ ' level ' ]>[ ' title | e ' ]</h[ ' level ' ]>
					[ ' preview | pre ' ]
				</section>
				<br>
			=]
			<form action="[ ' href: edit ' ]" method="post" id="edit_page" name="edit_page">
				[ ' csrf: edit_page ' ]
				<input type="hidden" name="section" value="[ ' sectionid ' ]">
				<input type="hidden" name="h_level" value="[ ' hlevel ' ]">
				<input type="hidden" name="previous" value="[ ' previous | e attr ' ]">
				[= new _ =
					<input type="hidden" name="page_lang" value="[ ' lang | e attr ' ]">
					<input type="hidden" name="tag" value="[ ' tag | e attr ' ]">
					<input type="hidden" name="add" value="1">
				=]
				[ '' buttons '' ]
				<br>
				<!-- Draft infobox will be inserted here by WikiEdit -->
				<div id="draft-infobox-placeholder"></div>
				<noscript><div class="errorbox-js">[ ' _t: WikiEditInactiveJs ' ]</div></noscript>
				[= r _ =
					<br>
					<h1>[ ' title | e ' ]</h1>
				=]
				[= e _ =
					<br>
					<label for="page_title">[ ' label ' ]</label><br>
					<input type="text" id="page_title" name="title" class="input-title" maxlength="250" value="[ ' title | e attr ' ]" size="100">
					<br>
				=]

				<label for="postText" class="visuallyhidden">[ ' _t: PageBody ' ]</label>
				<textarea id="postText" name="body" class="textarea-page" rows="40" cols="60" 
					[= user _ =
						data-heartbeat-timeout="[ ' heartbeat ' ]"
						data-heartbeat-name="edit_page"
					=]
					data-toolbar-buttons="[ ' toolbar | e ' ]"
					data-autosave-draft="[ ' autosave ' ]"
					data-syntax-highlighting="[ ' syntax ' ]"
					data-live-preview="[ ' preview ' ]"
					data-editor-height="[ ' height ' ]px"
					data-can-upload="[ ' upload ' ]"
					data-upload-nonce="[ ' upnonce ' ]"
					data-preview-nonce="[ ' pvnonce ' ]"
					required>[ ' body | pre ' ]</textarea>
				<script[ ' db: csp_nonce ' ]>
				document.addEventListener('DOMContentLoaded', () => {
					const wE = new WikiEdit({
						isRegisteredUser: [ ' isRegisteredUser ' ],
						// other options...
					});
					[= autocomplete _ =
						if (AutoComplete) {
							new AutoComplete(wE, "[ ' href: edit ' ]");
						}
					=]
					wE.init('postText', '[ ' wikiedit ' ]');
				});
				</script>
				<br>

				[= n _ =
					<label for="edit_note">[ ' _t: EditNote ' ]</label><br>
					<input type="text" id="edit_note" name="edit_note" class="input-summary" maxlength="200" value="[ ' note | e attr ' ]" size="100">
					<br>
				=]
				[= minor _ =
					<input type="checkbox" id="minor_edit" value="1" name="minor_edit">
					<label for="minor_edit">[ ' _t: EditMinor ' ]</label>
					<br>
				=]
				[= reviewed _ =
					<input type="checkbox" id="reviewed" name="reviewed" value="1">
					<label for="reviewed">[ ' _t: Reviewed ' ]</label>
					<br>
				=]
				[= a _ =
					<input type="checkbox" id="noid_publication" name="noid_publication" value="[ ' pageid ' ]" [ ' checked ' ]>
					<label for="noid_publication">[ ' _t: PostAnonymously ' ]</label>
					<br>
				=]
				[= w _ =
					<input type="checkbox" id="watchpage" name="watchpage" value="1" [ ' checked ' ]>
					<label for="watchpage" title="[ ' _t: NotifyMe ' ]">[ ' _t: SetWatch ' ]</label>
					<br>
				=]
				[= c _ =
					<br>[ ' _t: Categories ' ]: 
					[ ' categories ' ]
				=]
				[ ' captcha ' ]
				<br>
				[ '' buttons '' ]
			</form>
		=]
	</div>


[= buttons =]
<button type="submit" class="btn btn-primary" form="edit_page" name="save">[ ' _t: SaveButton ' ]</button>&nbsp;
<button type="submit" class="btn" form="edit_page" name="preview">[ ' _t: PreviewButton ' ]</button>&nbsp;
<a href="[ ' href: ' ]" class="btn-link"><button type="button" class="btn btn-cancel">[ ' _t: CancelButton ' ]</button></a>

[ === similarTags === ]
<ol>
	[= l _ =
		<li>[ '' page '' ]</li>
	=]
</ol>
