Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
c5300fa
Initial theme upload
TwitchisMental Feb 11, 2024
1289a9d
Add new form grids
jdarwood007 Apr 28, 2024
0229324
Adding font awesome for real this time
live627 Feb 20, 2024
48ab63c
fontawesome helptext
DiegoAndresCortes Dec 5, 2023
25d180d
Add files via upload
live627 Dec 7, 2023
817c484
Improve popup
live627 Feb 20, 2024
7893406
select login container, not login icon
live627 Dec 8, 2023
7d2ee00
make unread links have the same as menu buttons
live627 Dec 8, 2023
d9c8846
Delete Themes/default/scripts/editor.js
live627 Dec 9, 2023
44aa141
Update index.css
live627 Dec 9, 2023
6c446ed
Update Theme.php
live627 Dec 9, 2023
898a4a3
scrollabble
live627 Dec 10, 2023
a56cb37
no more eval
live627 Feb 1, 2024
2ae572a
move variables to a separate file
live627 Dec 11, 2023
7ba4c73
code tag changes
live627 Sep 24, 2023
4250e41
extract poll js
live627 Feb 20, 2024
4357586
nuke tabindex
live627 Feb 20, 2024
8536529
Disable forms on submit using the new `inert` HTML property
live627 Feb 20, 2024
a55d303
Update quick modify to support Ctrl+Enter
live627 Feb 20, 2024
5c8746b
css rev
DiegoAndresCortes Dec 29, 2023
a6305d4
move quicksearch
DiegoAndresCortes Dec 29, 2023
2c9cdbf
load icons.css and variables.css
DiegoAndresCortes Dec 29, 2023
0521c79
responsive css minor changes
DiegoAndresCortes Dec 29, 2023
462a641
layout tweaks
DiegoAndresCortes Dec 29, 2023
bf32d85
print top_info once
live627 Feb 20, 2024
d5599e2
generic notification popups
DiegoAndresCortes Dec 29, 2023
a385fc2
move toggle outside header tags
live627 Feb 20, 2024
2c968f7
tweaks to mobile menu action
live627 Feb 20, 2024
ff4a72a
more layout changes
DiegoAndresCortes Jan 7, 2024
9cdc960
buttonlist initial 'rework'
DiegoAndresCortes Jan 7, 2024
eb337ca
update slider
DiegoAndresCortes Jan 8, 2024
7c44a75
pagesection order
DiegoAndresCortes Jan 9, 2024
47c81c2
quickbuttons
DiegoAndresCortes Jan 9, 2024
63caca5
remove information class from display_head
DiegoAndresCortes Jan 10, 2024
3b910d9
change report icon
DiegoAndresCortes Jan 10, 2024
b79646a
infocenter indent and cleanup
DiegoAndresCortes Jan 10, 2024
607d665
calendar css and small tweaks
DiegoAndresCortes Jan 15, 2024
3e0ea5a
more miscellaneous changes/fixes
DiegoAndresCortes Jan 15, 2024
f6de6b0
icons css file rev 1
DiegoAndresCortes Jan 15, 2024
5e8cbe7
admin css rev 1
DiegoAndresCortes Jan 15, 2024
cf77c4b
tidy up variables file
DiegoAndresCortes Jan 15, 2024
4ec2f64
reset specificity, profilelinks vars and fixes
DiegoAndresCortes Jan 16, 2024
398a352
no overflow in jump_to_select
DiegoAndresCortes Jan 30, 2024
ab4a59a
Change calendar 'Location' field to input box
GL700Wing Feb 21, 2024
47de41a
fix stats panel
DiegoAndresCortes Feb 1, 2024
2e7f2fe
fix headings
DiegoAndresCortes Feb 1, 2024
75819a2
fix markup/html issues
DiegoAndresCortes Feb 11, 2024
a05397c
other minor fixes
DiegoAndresCortes Feb 11, 2024
87e553d
use avatar height as baseline for notis
DiegoAndresCortes Feb 12, 2024
bf72593
extract profile css and js
live627 Feb 29, 2024
5251b52
popup_container and generic menus
DiegoAndresCortes Feb 29, 2024
308d4f2
Update Recent.template.php
dragomano Feb 29, 2024
84a359d
Basic light/dark mode selected from system preferences
live627 Mar 1, 2024
c9eb2ed
A big blob of native js to replace jq
live627 Mar 9, 2024
94383a7
Rewrite our editor integration
live627 Mar 14, 2024
223ad40
fixes
DiegoAndresCortes Mar 9, 2024
7db907a
remove padding and margins from variables
DiegoAndresCortes Mar 9, 2024
a51a02b
decouple postbit css
DiegoAndresCortes Mar 10, 2024
e2770db
expand and select fix
DiegoAndresCortes Mar 10, 2024
2c9a468
use same styles/markup for item lists
DiegoAndresCortes Mar 10, 2024
e23aa36
revamp variants and dark mode
DiegoAndresCortes Mar 11, 2024
95036d6
additional fixes
DiegoAndresCortes Mar 11, 2024
bf0bbcc
use correct method for time
DiegoAndresCortes Mar 11, 2024
f1464a9
variant and color mode fixes
DiegoAndresCortes Mar 11, 2024
1a10d9c
style and color fixes
DiegoAndresCortes Mar 11, 2024
452badd
update user option for variant or color mode when switching
DiegoAndresCortes Mar 12, 2024
4c7fe4f
fix search layout
DiegoAndresCortes Mar 13, 2024
96dff19
dark mode colors
DiegoAndresCortes Mar 13, 2024
c99d487
calendar and date fixes
DiegoAndresCortes Mar 22, 2024
09d0a9d
sceditor css vars
DiegoAndresCortes Apr 3, 2024
29e001a
timepicker css
DiegoAndresCortes Apr 3, 2024
eee645d
rtl more cleanup
DiegoAndresCortes Apr 3, 2024
89f7501
random news, newsfader fix, slogan and user_panel alignment
DiegoAndresCortes Apr 14, 2024
8d0c3f1
tweak info_center markup and css
DiegoAndresCortes Apr 14, 2024
6914adf
genericmenu fixes
DiegoAndresCortes Apr 15, 2024
41a9c96
word-break for signatures
DiegoAndresCortes Apr 25, 2024
9899f7c
fix buttonlist dropdown and remove bloat
DiegoAndresCortes Apr 25, 2024
ace504d
redesign report selection form
live627 Apr 30, 2024
a757f1a
Nothing to see here
live627 Sep 18, 2024
4183105
you killing me :P
live627 Mar 1, 2025
fc6294b
simplify menu a tad
live627 Sep 5, 2024
ec9599b
formatting, tweaks + css fixes
DiegoAndresCortes Oct 12, 2024
f051c91
board and topic layout
DiegoAndresCortes Oct 12, 2024
485f9b7
postbit and poster layout
DiegoAndresCortes Oct 12, 2024
d2026c2
tidy up attachments css and use css variables
DiegoAndresCortes Oct 12, 2024
1cb587f
icons cleanup
DiegoAndresCortes Oct 12, 2024
fb11687
admin layout tweaks
DiegoAndresCortes Oct 12, 2024
c8661d0
replace wrapper id selectors with a generic wrapper container selector
DiegoAndresCortes Oct 12, 2024
f0a0678
calendar and events css tidy up
DiegoAndresCortes Oct 12, 2024
67d1110
responsive css tidy up, and change breakpoints
DiegoAndresCortes Oct 12, 2024
2be5143
fix buttonlist dropmenu items
DiegoAndresCortes Oct 12, 2024
56d0554
rewrite atwho in plain JS
live627 Dec 8, 2024
0dc1508
move more js to dedicated files
live627 Dec 14, 2024
2619312
topic modify plugin more extensible
live627 Dec 17, 2024
12e6d5c
add structured data to linktree
live627 Dec 23, 2024
2723406
a stash of editor plugins
live627 Jan 26, 2025
288e88e
break out board list and topic list
live627 Jan 26, 2025
bb8acc1
support attributes in xml data
live627 Feb 25, 2025
24bbbad
Utils::$context['additional_options']
live627 Feb 26, 2025
8461169
messageindex grid from array
live627 Mar 6, 2025
c026e02
Update Languages/en_US/ManageMaintenance.php
live627 Apr 3, 2025
80f4c30
Update Languages/en_US/ManageMaintenance.php
live627 Apr 3, 2025
be1a272
Delete Themes/default/scripts/sceditor.plugins.quote-selected.js
live627 Apr 3, 2025
51fb719
Update Languages/en_US/ManageMaintenance.php
live627 Apr 3, 2025
00c6df3
better year range
live627 Apr 4, 2025
410c853
Accessibility improvements
live627 Apr 4, 2025
10c00f2
remove debugging lefttover
live627 Apr 4, 2025
12a43e5
Update Themes/default/webfonts/index.php
live627 Apr 5, 2025
107505a
Merge remote-tracking branch 'SimpleMachines/release-3.0' into theme
live627 Apr 7, 2025
6a73f00
Apply suggestions from code review
live627 Apr 22, 2025
b63d899
introduce integrate_sceditor_locale
live627 Apr 22, 2025
365f105
use new api for editortxt
live627 Apr 22, 2025
23c09ff
fixes for bbcode definitions in editor
live627 Apr 22, 2025
0ec51cf
partial revert of 23c09ff67251d96d045ee21b8ca59424c7e62187; see https…
live627 Apr 28, 2025
6793e49
Merge remote-tracking branch 'SimpleMachines/release-3.0' into theme
live627 Apr 28, 2025
c21c21f
Merge remote-tracking branch 'SimpleMachines/release-3.0' into theme
live627 Jun 26, 2025
526628f
fix calls
live627 Jul 28, 2025
86c6207
restore selection when a toolbar button is pressed
live627 Jul 28, 2025
a302c9d
Merge remote-tracking branch 'SimpleMachines/release-3.0' into theme
live627 Aug 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 69 additions & 67 deletions Sources/Editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ class Editor implements \ArrayAccess, \Stringable
* ```php
* [
* 'code' => 'b',
* 'description' => Lang::$editortxt['bold'], // Optional
* 'description' => Lang::getTxt('bold', var: 'editortxt'), // Optional
* 'image' => 'bold', // Optional
* 'before' => '[b]', // Optional
* 'after' => '[/b]', // Optional
Expand Down Expand Up @@ -511,7 +511,7 @@ protected static function initBbcTags(): void
/*
array(
'code' => 'b', // Required
'description' => Lang::$editortxt['bold'], // Required
'description' => Lang::getTxt('bold', var: 'editortxt'), // Required
'image' => 'bold', // Optional
'before' => '[b]', // Optional
'after' => '[/b]', // Optional
Expand All @@ -521,142 +521,142 @@ protected static function initBbcTags(): void
[
[
'code' => 'bold',
'description' => Lang::$editortxt['bold'],
'description' => Lang::getTxt('bold', var: 'editortxt'),
],
[
'code' => 'italic',
'description' => Lang::$editortxt['italic'],
'description' => Lang::getTxt('italic', var: 'editortxt'),
],
[
'code' => 'underline',
'description' => Lang::$editortxt['underline'],
'description' => Lang::getTxt('underline', var: 'editortxt'),
],
[
'code' => 'strike',
'description' => Lang::$editortxt['strikethrough'],
'description' => Lang::getTxt('strikethrough', var: 'editortxt'),
],
[
'code' => 'superscript',
'description' => Lang::$editortxt['superscript'],
'description' => Lang::getTxt('superscript', var: 'editortxt'),
],
[
'code' => 'subscript',
'description' => Lang::$editortxt['subscript'],
'description' => Lang::getTxt('subscript', var: 'editortxt'),
],
[],
[
'code' => 'pre',
'description' => Lang::$editortxt['preformatted_text'],
'description' => Lang::getTxt('preformatted_text', var: 'editortxt'),
],
[
'code' => 'left',
'description' => Lang::$editortxt['align_left'],
'description' => Lang::getTxt('align_left', var: 'editortxt'),
],
[
'code' => 'center',
'description' => Lang::$editortxt['center'],
'description' => Lang::getTxt('center', var: 'editortxt'),
],
[
'code' => 'right',
'description' => Lang::$editortxt['align_right'],
'description' => Lang::getTxt('align_right', var: 'editortxt'),
],
[
'code' => 'justify',
'description' => Lang::$editortxt['justify'],
'description' => Lang::getTxt('justify', var: 'editortxt'),
],
[],
[
'code' => 'font',
'description' => Lang::$editortxt['font_name'],
'description' => Lang::getTxt('font_name', var: 'editortxt'),
],
[
'code' => 'size',
'description' => Lang::$editortxt['font_size'],
'description' => Lang::getTxt('font_size', var: 'editortxt'),
],
[
'code' => 'color',
'description' => Lang::$editortxt['font_color'],
'description' => Lang::getTxt('font_color', var: 'editortxt'),
],
[],
[
'code' => 'removeformat',
'description' => Lang::$editortxt['remove_formatting'],
'description' => Lang::getTxt('remove_formatting', var: 'editortxt'),
],
],
[
[
'code' => 'floatleft',
'description' => Lang::$editortxt['float_left'],
'description' => Lang::getTxt('float_left', var: 'editortxt'),
],
[
'code' => 'floatright',
'description' => Lang::$editortxt['float_right'],
'description' => Lang::getTxt('float_right', var: 'editortxt'),
],
[],
[
'code' => 'youtube',
'description' => Lang::$editortxt['insert_youtube_video'],
'description' => Lang::getTxt('insert_youtube_video', var: 'editortxt'),
],
[
'code' => 'image',
'description' => Lang::$editortxt['insert_image'],
'description' => Lang::getTxt('insert_image', var: 'editortxt'),
],
[
'code' => 'email',
'description' => Lang::$editortxt['insert_email'],
'description' => Lang::getTxt('insert_email', var: 'editortxt'),
],
[
'code' => 'link',
'description' => Lang::$editortxt['insert_link'],
'description' => Lang::getTxt('insert_link', var: 'editortxt'),
],
[
'code' => 'unlink',
'description' => Lang::$editortxt['unlink'],
'description' => Lang::getTxt('unlink', var: 'editortxt'),
],
[],
[
'code' => 'table',
'description' => Lang::$editortxt['insert_table'],
'description' => Lang::getTxt('insert_table', var: 'editortxt'),
],
[
'code' => 'code',
'description' => Lang::$editortxt['code'],
'description' => Lang::getTxt('code', var: 'editortxt'),
],
[
'image' => 'tt',
'code' => 'tt',
'description' => Lang::$editortxt['tt'],
'description' => Lang::getTxt('tt', var: 'editortxt'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tt and heading buttons should be moved in this list to match the changes in 05664be.

Should also incorporate the changes to this list that were made in #8593 (i.e. buttons for the new spoiler and details commands).

],
[
'code' => 'quote',
'description' => Lang::$editortxt['insert_quote'],
'description' => Lang::getTxt('insert_quote', var: 'editortxt'),
],
[],
[
'code' => 'bulletlist',
'description' => Lang::$editortxt['bullet_list'],
'description' => Lang::getTxt('bullet_list', var: 'editortxt'),
],
[
'code' => 'orderedlist',
'description' => Lang::$editortxt['numbered_list'],
'description' => Lang::getTxt('numbered_list', var: 'editortxt'),
],
[
'code' => 'horizontalrule',
'description' => Lang::$editortxt['insert_horizontal_rule'],
'description' => Lang::getTxt('insert_horizontal_rule', var: 'editortxt'),
],
[
'image' => 'heading',
'code' => 'heading',
'description' => Lang::$editortxt['heading'],
'description' => Lang::getTxt('heading', var: 'editortxt'),
],
[],
[
'code' => 'maximize',
'description' => Lang::$editortxt['maximize'],
'description' => Lang::getTxt('maximize', var: 'editortxt'),
],
[
'code' => 'source',
'description' => Lang::$editortxt['view_source'],
'description' => Lang::getTxt('view_source', var: 'editortxt'),
],
],
];
Expand Down Expand Up @@ -700,25 +700,27 @@ protected function init(): void
Theme::loadJavaScriptFile('jquery.sceditor.bbcode.min.js', [], 'smf_sceditor_bbcode');
Theme::loadJavaScriptFile('sceditor.plugins.smf.js', ['minimize' => true], 'smf_sceditor_smf_plugin');

Theme::addInlineJavaScript(
'
sceditor.locale["' . Lang::$txt['lang_dictionary'] . '"] = {
"Width (optional):": "' . Lang::$editortxt['width'] . '",
"Height (optional):": "' . Lang::$editortxt['height'] . '",
"Insert": "' . Lang::$editortxt['insert'] . '",
"Description (optional):": "' . Lang::$editortxt['description'] . '",
"Rows:": "' . Lang::$editortxt['rows'] . '",
"Cols:": "' . Lang::$editortxt['cols'] . '",
"URL:": "' . Lang::$editortxt['url'] . '",
"E-mail:": "' . Lang::$editortxt['email'] . '",
"Video URL:": "' . Lang::$editortxt['video_url'] . '",
"More": "' . Lang::$editortxt['more'] . '",
"Close": "' . Lang::$editortxt['close'] . '",
dateFormat: "' . Lang::$editortxt['dateformat'] . '"
};',
true,
);
$locale_key = Lang::getTxt('lang_dictionary', file: 'General');

$translation_map = [
'Width (optional):' => Lang::getTxt('width', var: 'editortxt'),
'Height (optional):' => Lang::getTxt('height', var: 'editortxt'),
'Insert' => Lang::getTxt('insert', var: 'editortxt'),
'Description (optional):' => Lang::getTxt('description', var: 'editortxt'),
'Rows:' => Lang::getTxt('rows', var: 'editortxt'),
'Cols:' => Lang::getTxt('cols', var: 'editortxt'),
'URL:' => Lang::getTxt('url', var: 'editortxt'),
'E-mail:' => Lang::getTxt('email', var: 'editortxt'),
'Video URL:' => Lang::getTxt('video_url', var: 'editortxt'),
'More' => Lang::getTxt('more', var: 'editortxt'),
'Close' => Lang::getTxt('close', var: 'editortxt'),
'dateFormat' => Lang::getTxt('dateformat', var: 'editortxt'),
];
IntegrationHook::call('integrate_sceditor_locale', [&$translation_map]);

$sc_extra_langs = 'sceditor.locale["' . $locale_key . '"] = ' . json_encode($translation_map, JSON_UNESCAPED_UNICODE) . ';';

Theme::addInlineJavaScript($sc_extra_langs, true);
Theme::addInlineJavaScript('
var smf_smileys_url = \'' . Theme::$current->settings['smileys_url'] . '\';
var bbc_quote_from = \'' . addcslashes(Lang::getTxt('quote_from', file: 'General'), "'") . '\';
Expand Down Expand Up @@ -968,21 +970,21 @@ protected function setSCEditorOptions(array $editorOptions)
'emoticonsEnabled' => !$this->disable_smiley_box,
'emoticonsRoot' => Theme::$current->settings['smileys_url'] . '/',
'colors' => [
['black', Lang::$editortxt['black']],
['red', Lang::$editortxt['red']],
['yellow', Lang::$editortxt['yellow']],
['pink', Lang::$editortxt['pink']],
['green', Lang::$editortxt['green']],
['orange', Lang::$editortxt['orange']],
['purple', Lang::$editortxt['purple']],
['blue', Lang::$editortxt['blue']],
['beige', Lang::$editortxt['beige']],
['brown', Lang::$editortxt['brown']],
['teal', Lang::$editortxt['teal']],
['navy', Lang::$editortxt['navy']],
['maroon', Lang::$editortxt['maroon']],
['limegreen', Lang::$editortxt['lime_green']],
['white', Lang::$editortxt['white']],
['black', Lang::getTxt('black', var: 'editortxt')],
['red', Lang::getTxt('red', var: 'editortxt')],
['yellow', Lang::getTxt('yellow', var: 'editortxt')],
['pink', Lang::getTxt('pink', var: 'editortxt')],
['green', Lang::getTxt('green', var: 'editortxt')],
['orange', Lang::getTxt('orange', var: 'editortxt')],
['purple', Lang::getTxt('purple', var: 'editortxt')],
['blue', Lang::getTxt('blue', var: 'editortxt')],
['beige', Lang::getTxt('beige', var: 'editortxt')],
['brown', Lang::getTxt('brown', var: 'editortxt')],
['teal', Lang::getTxt('teal', var: 'editortxt')],
['navy', Lang::getTxt('navy', var: 'editortxt')],
['maroon', Lang::getTxt('maroon', var: 'editortxt')],
['limegreen', Lang::getTxt('lime_green', var: 'editortxt')],
['white', Lang::getTxt('white', var: 'editortxt')],
],
'fonts' => 'Arial,Arial Black,Comic Sans MS,Courier New,Georgia,Impact,Sans-serif,Serif,Times New Roman,Trebuchet MS,Verdana',
'icons' => 'monocons',
Expand Down
2 changes: 1 addition & 1 deletion Themes/default/css/jquery.sceditor.default.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ table, td {
padding: .25em;
}

span.phpcode, font[face=monospace] {
span.phpcode, .bbc_tt {
background-color: rgba(127, 127, 127, 0.25);
padding: 0 0.2ch;
display: inline;
Expand Down
38 changes: 6 additions & 32 deletions Themes/default/scripts/sceditor.plugins.smf.js
Original file line number Diff line number Diff line change
Expand Up @@ -1153,20 +1153,7 @@ sceditor.formats.bbcode.set(
}
);

sceditor.formats.bbcode.set(
'pre', {
tags: {
a: {
'data-type': ['ftp']
}
},
format({href}, content) {
return (href == content ? '[ftp]' : '[ftp=' + href + ']') + content + '[/ftp]';
},
html(token, {defaultattr}, content) {
return '<a data-type="ftp" href="' + (defaultattr || content) + '">' + content + '</a>';
}
})
sceditor.formats.bbcode
.set('table', {
breakStart: true,
isHtmlInline: false,
Expand All @@ -1178,10 +1165,10 @@ sceditor.formats.bbcode.set(
.set('tt', {
tags: {
tt: null,
span: {'class': ['tt']}
code: {'class': ['bbc_tt']}
},
format: '[tt]{0}[/tt]',
html: '<span class="tt">{0}</span>'
html: '<code class="bbc_tt">{0}</code>'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to make this work, the command for the tt button will also need to be changed.

However, it will take some effort to do that in a way that works well. I wrote the current code to use <font face="monospace">{0}</font> because using the font tag allowed me to use this.execCommand(), which provides nice and fluid behaviour for applying and/or removing the [tt] BBCode to arbitrary spans of text. You can see this code in the tt command's exec function:

				if (font === 'monospace') {
					this.execCommand('removeFormat');
				} else {
					this.execCommand('fontname', 'monospace');
				}

In order to use <code class="bbc_tt">{0}</code>, you will need to replace that with some other code to add and remove the <code> tags from around selected text. The following code from the spoiler command's exec function will get you part of the way there.

			// If we are currently inside an inline spoiler span, remove it.
			const spoilerElement = sceditor.dom.closest(this.currentNode(), '.bbc_inline_spoiler');

			if (spoilerElement) {
				const rangeHelper = this.getRangeHelper();
				rangeHelper.insertMarkers();
				rangeHelper.saveRange();
				spoilerElement.insertAdjacentHTML('beforebegin', spoilerElement.innerHTML);
				rangeHelper.restoreRange();
				spoilerElement.remove();
				return;
			}

			// Otherwise, insert it.
			this.insert('[spoiler]', '[/spoiler]');

However, this code doesn't fully emulate the behaviour of execCommand(). In the case of the spoiler BBCode that's fine and actually preferable. But in the case of tt, and particularly when removing tt from selected text, a full emulation of the behaviour of execCommand() is desirable.

})
.set('pre', {
tags: {
Expand Down Expand Up @@ -1216,21 +1203,8 @@ sceditor.formats.bbcode.set(
format: "[php]{0}[/php]",
html: '<code class="php">{0}</code>'
}
);

sceditor.formats.bbcode.set(
'tt', {
tags: {
font: {
'face': 'monospace'
}
},
format: '[tt]{0}[/tt]',
html: '<font face="monospace">{0}</font>'
}
);

sceditor.formats.bbcode.set(
)
set(
'code', {
tags: {
code: null,
Expand All @@ -1246,7 +1220,7 @@ sceditor.formats.bbcode.set(
format: function (element, content) {
let title = element.getAttribute('data-title');

if (element.className === 'php')
if (element.className === 'phpcode' || element.className === 'bbc_tt')
return content;
else if (element.tagName === 'DIV')
return '';
Expand Down