You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A CRPG, where there's tons of Dialogue Text, usually with the need of typographic emphasis.
Describe the problem or limitation you are having in your project
When defining the text within a RichTextLabel through the Inspector or using a @tool script with TextEdit or LineEdit to define text that will be used in a RichTextLabel, it is considerably cumbersome to manually add all typographic emphasis wherever needed, as it involves several unusual keystrokes.
When writing tens of hundreds of paragraphs of dialogue, you strongly miss hotkeys that are commonplace in average text editors.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Adding the most common-use case BBCode snippets as hotkeys, which are available whenever an editable text in the Inspector is focused, such as when editing the contents of a RichTextLabel.
The most obvious candidates are Bold (CTRL+B), Italics (CTRL+I), and Underline (CTRL+U).
Other shortcuts could be considered, such as Strikethrough (CTRL+S) or even Paragraph (CTRL+P), although in these last two cases, they would conflict with existing engine hotkeys, Save and Quick Open, respectively. Imo, I think it would be acceptable (if possible at all) for this hotkeys to override generic engine hotkeys as long as a TextEdit where these hotkeys are relevant is focused, such as the Text property of a RichTextLabel in the Inspector, specially if the hotkey used is the same letter used on the BBCode (b in BBCode for Bold, so CTRL+B), which would make the system quite intuitive to use.
Nevertheless, the goal is to make writing with BBCode faster and easier, specially when dealing with large amounts of RichText.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Whenever a hotkey is pressed, text is modified based on the current edit state.
No Selection, Caret is not under any word: The BBCode snippet is added and the caret placed in-between.
E.g. CTRL+B -> [b]|[/b]
No Selection, Caret is under a word: The BBCode snippet is added and the word placed in-between.
E.g. "this is a |potato salad" -> CTRL+I -> "this is a [i]|potato[/i] salad"
Text Selected: The BBCode snippet is added with the selection in-between. Selection remains.
E.g. "I am considerably angry, Tim" -> CTRL+U -> "I am [u]considerably angry[/u], Tim"
(This sample below does not work exactly like it, but it shows the gist of it. Reference for proper implementation can be found in any decent text editor, even GitHub's text editor has this.)
EnhancedTextEdit.mp4
If this enhancement will not be used often, can it be worked around with a few lines of script?
It can be bypassed easily by manually writing the BBCode snippets, the problem is the time it takes to do so when it is done very frequently.
Is there a reason why this should be core and not an add-on in the asset library?
Having a full "BBCode text editor" addon would be ideal, so that all these tools are available in a specialized text editor, rather than tuning Godot itself into implementing all of these shortcuts.
However, I think Godot itself integrating the "big 3" (B/I/U) would be an upgrade, specially given that there's no Godot generic hotkeys occupying these keys, and almost any software where you can write RichText accommodates them.
The text was updated successfully, but these errors were encountered:
This is interesting, but we currently don't have a property hint that indicates that a multitext property expects BBCode. (We have one for Expressions, where a fixed-width font is used and generic syntax highlighting is applied.)
Such a property hint would need to be added first, and some buttons would also have to be added at the top of the LineEdit to ease discoverability.
Describe the project you are working on
A CRPG, where there's tons of Dialogue Text, usually with the need of typographic emphasis.
Describe the problem or limitation you are having in your project
When defining the text within a RichTextLabel through the Inspector or using a
@tool
script with TextEdit or LineEdit to define text that will be used in a RichTextLabel, it is considerably cumbersome to manually add all typographic emphasis wherever needed, as it involves several unusual keystrokes.When writing tens of hundreds of paragraphs of dialogue, you strongly miss hotkeys that are commonplace in average text editors.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Adding the most common-use case BBCode snippets as hotkeys, which are available whenever an editable text in the Inspector is focused, such as when editing the contents of a
RichTextLabel
.The most obvious candidates are Bold (
CTRL+B
), Italics (CTRL+I
), and Underline (CTRL+U
).Other shortcuts could be considered, such as Strikethrough (
CTRL+S
) or even Paragraph (CTRL+P
), although in these last two cases, they would conflict with existing engine hotkeys, Save and Quick Open, respectively. Imo, I think it would be acceptable (if possible at all) for this hotkeys to override generic engine hotkeys as long as a TextEdit where these hotkeys are relevant is focused, such as theText
property of aRichTextLabel
in the Inspector, specially if the hotkey used is the same letter used on the BBCode (b
in BBCode for Bold, soCTRL+B
), which would make the system quite intuitive to use.Nevertheless, the goal is to make writing with BBCode faster and easier, specially when dealing with large amounts of RichText.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Whenever a hotkey is pressed, text is modified based on the current edit state.
No Selection, Caret is not under any word: The BBCode snippet is added and the caret placed in-between.
E.g.
CTRL+B
->[b]|[/b]
No Selection, Caret is under a word: The BBCode snippet is added and the word placed in-between.
E.g. "this is a |potato salad" ->
CTRL+I
-> "this is a [i]|potato[/i] salad"Text Selected: The BBCode snippet is added with the selection in-between. Selection remains.
E.g. "I am considerably angry, Tim" ->
CTRL+U
-> "I am [u]considerably angry[/u], Tim"(This sample below does not work exactly like it, but it shows the gist of it. Reference for proper implementation can be found in any decent text editor, even GitHub's text editor has this.)
EnhancedTextEdit.mp4
If this enhancement will not be used often, can it be worked around with a few lines of script?
It can be bypassed easily by manually writing the BBCode snippets, the problem is the time it takes to do so when it is done very frequently.
Is there a reason why this should be core and not an add-on in the asset library?
Having a full "BBCode text editor" addon would be ideal, so that all these tools are available in a specialized text editor, rather than tuning Godot itself into implementing all of these shortcuts.
However, I think Godot itself integrating the "big 3" (B/I/U) would be an upgrade, specially given that there's no Godot generic hotkeys occupying these keys, and almost any software where you can write RichText accommodates them.
The text was updated successfully, but these errors were encountered: