Skip to content

Commit 11064ae

Browse files
authored
Merge pull request #8949 from live627/refactor/editor
Rewrite our editor integration
2 parents ed9b690 + 5e643a9 commit 11064ae

15 files changed

+1851
-1806
lines changed

Languages/en_US/Editor.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,21 @@
1515
$editortxt['font_name'] = 'Font name';
1616
$editortxt['font_size'] = 'Font size';
1717
$editortxt['font_color'] = 'Font color';
18+
$editortxt['black'] = 'Black';
19+
$editortxt['red'] = 'Red';
20+
$editortxt['yellow'] = 'Yellow';
21+
$editortxt['pink'] = 'Pink';
22+
$editortxt['green'] = 'Green';
23+
$editortxt['orange'] = 'Orange';
24+
$editortxt['purple'] = 'Purple';
25+
$editortxt['blue'] = 'Blue';
26+
$editortxt['beige'] = 'Beige';
27+
$editortxt['brown'] = 'Brown';
28+
$editortxt['teal'] = 'Teal';
29+
$editortxt['navy'] = 'Navy';
30+
$editortxt['maroon'] = 'Maroon';
31+
$editortxt['lime_green'] = 'Lime Green';
32+
$editortxt['white'] = 'White';
1833
$editortxt['remove_formatting'] = 'Remove formatting';
1934
$editortxt['cut'] = 'Cut';
2035
$editortxt['browser_no_cut'] = 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X';

Sources/Actions/Display.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,9 +1308,6 @@ protected function loadEditor(): void
13081308
'labels' => [
13091309
'post_button' => Lang::getTxt('post', file: 'General'),
13101310
],
1311-
// add height and width for the editor
1312-
'height' => '150px',
1313-
'width' => '100%',
13141311
// We do HTML preview here.
13151312
'preview_type' => Editor::PREVIEW_HTML,
13161313
// This is required

Sources/Actions/Post.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1770,12 +1770,12 @@ protected function loadEditor(): void
17701770
'labels' => [
17711771
'post_button' => Utils::$context['submit_label'],
17721772
],
1773-
// add height and width for the editor
1774-
'height' => '175px',
1775-
'width' => '100%',
17761773
// We do XML preview here.
17771774
'preview_type' => Editor::PREVIEW_XML,
17781775
'required' => true,
1776+
'options' => [
1777+
'autofocus' => $this->intent !== self::INTENT_NEW_TOPIC,
1778+
],
17791779
]);
17801780
}
17811781

0 commit comments

Comments
 (0)