Mercurial Hosting > freedit
comparison src/bbcode/bbcode.js @ 53:cac477dd1f82
convert image and video urls
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Thu, 24 Nov 2022 22:54:43 -0700 |
| parents | 9f8ebc757814 |
| children | 8b5b1bce7d6b |
comparison
equal
deleted
inserted
replaced
| 52:9f8ebc757814 | 53:cac477dd1f82 |
|---|---|
| 167 if( !enabledInPreview.includes(b) ) | 167 if( !enabledInPreview.includes(b) ) |
| 168 b.disabled = true; | 168 b.disabled = true; |
| 169 } | 169 } |
| 170 textarea.style.display = 'none'; | 170 textarea.style.display = 'none'; |
| 171 divPreview.style.display = 'block'; | 171 divPreview.style.display = 'block'; |
| 172 let url = '/bbcode/preview.js?text=' + encodeURIComponent(textarea.value) + '&convert_urls=' + convertUrls; | 172 let postData = 'text=' + encodeURIComponent(textarea.value) + '&convert_urls=' + convertUrls; |
| 173 ajax( url, null, {preview: contextPreview} ); | 173 ajax( '/bbcode/preview.js', postData, {preview: contextPreview} ); |
| 174 } else { | 174 } else { |
| 175 for( let b of buttons ) { | 175 for( let b of buttons ) { |
| 176 b.disabled = false; | 176 b.disabled = false; |
| 177 } | 177 } |
| 178 textarea.style.display = 'initial'; | 178 textarea.style.display = 'initial'; |
