comparison src/thread.html.luan @ 49:f225e82b2bf8

add code bbcode
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 17 Nov 2022 16:46:21 -0700
parents 289718f121e4
children 78b2d6995244
comparison
equal deleted inserted replaced
48:4e1a01db19ec 49:f225e82b2bf8
51 font-weight: bold; 51 font-weight: bold;
52 } 52 }
53 span[ago] { 53 span[ago] {
54 color: #888; 54 color: #888;
55 } 55 }
56 [message] {
57 white-space: pre-wrap;
58 line-height: 1.4;
59 }
60 <% if user_name == nil then %> 56 <% if user_name == nil then %>
61 [logged_in] { 57 [logged_in] {
62 display: none; 58 display: none;
63 } 59 }
64 <% end %> 60 <% end %>
100 ajax('save_edit.js',postData); 96 ajax('save_edit.js',postData);
101 } 97 }
102 function updated(postId,html) { 98 function updated(postId,html) {
103 let postDiv = document.querySelector('[post="'+postId+'"]'); 99 let postDiv = document.querySelector('[post="'+postId+'"]');
104 if(postDiv) 100 if(postDiv)
105 postDiv.querySelector('[message]').innerHTML = html; 101 postDiv.querySelector('[from_bbcode]').outerHTML = html;
106 } 102 }
107 103
108 function newPost() { 104 function newPost() {
109 let postDiv = document.querySelector('[post="new"]'); 105 let postDiv = document.querySelector('[post="new"]');
110 let textarea = postDiv.querySelector('textarea') 106 let textarea = postDiv.querySelector('textarea')