diff src/thread.html.luan @ 21:33731231093a

fix bbcode editing
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 17 Jul 2022 08:24:52 -0600
parents 3ea49246d6a7
children 66fd3784e60e
line wrap: on
line diff
--- a/src/thread.html.luan	Wed Jul 13 22:00:00 2022 -0600
+++ b/src/thread.html.luan	Sun Jul 17 08:24:52 2022 -0600
@@ -73,7 +73,7 @@
 			function saveEdit(a) {
 				let postDiv = getPostDiv(a);
 				let post = postDiv.getAttribute('post');
-				let text = postDiv.querySelector('[contentEditable]').textContent;
+				let text = postDiv.querySelector('[contentEditable]').innerHTML;
 				let postData = 'post=' + post + '&text=' + encodeURIComponent(text);
 				ajax("save_edit.js",postData);
 			}
@@ -134,7 +134,7 @@
 		<span hidden delete>Delete? <a href="javascript:" onclick="deleteYes(parentNode)">yes</a> / <a href="javascript:" onclick="deleteNo(parentNode)">no</a></span>
 		<span hidden undelete><%deletePost()%></span>
 		<div hidden edit>
-			<div contentEditable onkeypress="return editorKey()"></div>
+			<div contentEditable></div>
 			<p>
 				<button onclick="saveEdit(this)">save</button>
 				<button onclick="cancelEdit(this)">cancel</button>