diff src/bbcode/bbcode.js @ 49:f225e82b2bf8

add code bbcode
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 17 Nov 2022 16:46:21 -0700
parents 4e1a01db19ec
children 0d99cec5142c
line wrap: on
line diff
--- a/src/bbcode/bbcode.js	Thu Nov 17 00:11:44 2022 -0700
+++ b/src/bbcode/bbcode.js	Thu Nov 17 16:46:21 2022 -0700
@@ -49,6 +49,8 @@
 				<button type=button sup title="Superscript"><img src="/bbcode/icons/superscript.svg"></button>
 				<button type=button ul title="Bullet list"><img src="/bbcode/icons/format_list_bulleted.svg"></button>
 				<button type=button ol title="Numbered list"><img src="/bbcode/icons/format_list_numbered.svg"></button>
+				<button type=button code_block title="Code block"><img src="/bbcode/icons/code_blocks.svg"></button>
+				<button type=button code_inline title="Inline code"><img src="/bbcode/icons/code.svg"></button>
 				<button type=button more checked title="More..."><img src="/bbcode/icons/more_horiz.svg"></button>
 				<input type=file>
 				<button type=button upload title="Upload File"><img src="/bbcode/icons/file_upload.svg"></button>
@@ -129,6 +131,8 @@
 	add('sup','[sup]','[/sup]');
 	add('ul','[list]\n[item]','[/item]\n[/list]');
 	add('ol','[list=1]\n[item]','[/item]\n[/list]');
+	add('code_block','[code]','[/code]');
+	add('code_inline','[code=inline]','[/code]');
 
 	let fileInput = div.querySelector('input[type="file"]');
 	div.querySelector('button[upload]').onclick = function(){ fileInput.click(); };