Opened 3 years ago
Last modified 7 months ago
#13311 assigned enhancement
Toolbar button to quote text as a discussion citation
| Reported by: | anonymous | Owned by: | Ryan J Ollos |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.6.1 |
| Component: | general | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description
All Trac text input fields (like this ticket description field) have a little toolbar with buttons to make text bold or italic, insert a heading, a link, a code block, a horizontal rule, a new paragraph, a line break or an image.
It would be useful to have an additional button to quote the currently selected text as DiscussionCitations by adding > before each selected line.
Attachments (1)
Change History (12)
comment:1 by , 3 years ago
| Milestone: | → next-major-releases |
|---|
comment:2 by , 3 years ago
The JavaScript code would be fairly simple, but it looks like the image edit_toolbar.png needs to be modified.
by , 3 years ago
| Attachment: | edit_toolbar_T13311.png added |
|---|
comment:3 by , 3 years ago
Would this work?
The last two icons could be used for (de-)indenting the selected block of text (or the current line) by two spaces as required for example for WikiFormatting nested lists, block quotes, or for adjusting code snippets.
follow-up: 7 comment:4 by , 3 years ago
th:TextareaKeyBindingsPlugin has Javascript code for (de-)indent. Adding "> " + with indentation delta 0 should also be easy. But adding the buttons would be better in Trac core.
comment:5 by , 3 years ago
| Milestone: | next-major-releases → 1.4.3 |
|---|---|
| Owner: | set to |
| Status: | new → assigned |
Looks good. Thanks!
comment:6 by , 3 years ago
I wondered if there's a common keyboard shortcut, but apparently not:
| Button icon | Keyboard shortcut | |
| CKEditor | ❞ | - |
| Gitlab | ❞ | - |
| Github | |= | - |
| Slack | |= | Ctrl+Shift+9
|
| Stackoverflow | ❞ | Ctrl+Q
|
| TinyMCE | - | - |
| Wordpress | ❞ | Shift+Alt+Q
|
comment:7 by , 3 years ago
Replying to anonymous:
th:TextareaKeyBindingsPlugin has Javascript code for (de-)indent.
I'm interested in eventually integrating this plugin to Trac. It might be a good project for someone that wants to get involved.
Trac allows tabbing to navigate form fields, which is standard behavior for web forms. If integrating the plugin, we'd need a way to preserve that behavior such as:
- Using a key or key combination other than tab for indent/dedent.
- Having vim-like behavior to toggle between normal (where tab moves to next field) and edit mode (where tab is input to textarea).
comment:8 by , 3 years ago
| Milestone: | 1.4.3 → 1.5.3 |
|---|
comment:9 by , 3 years ago
| Milestone: | 1.5.3 → 1.5.4 |
|---|
comment:10 by , 2 years ago
| Milestone: | 1.5.4 → 1.5.5 |
|---|
comment:11 by , 7 months ago
| Milestone: | 1.5.5 → 1.6.1 |
|---|




PatchWelcome