Edgewall Software
Modify

Opened 17 months ago

Last modified 5 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.5.5
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)

edit_toolbar_T13311.png (1.0 KB ) - added by anonymous 17 months ago.

Download all attachments as: .zip

Change History (11)

comment:1 by Ryan J Ollos, 17 months ago

Milestone: next-major-releases

comment:2 by Ryan J Ollos, 17 months ago

The JavaScript code would be fairly simple, but it looks like the image edit_toolbar.png needs to be modified.

by anonymous, 17 months ago

Attachment: edit_toolbar_T13311.png added

comment:3 by anonymous, 17 months 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.

comment:4 by anonymous, 17 months 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 Ryan J Ollos, 17 months ago

Milestone: next-major-releases1.4.3
Owner: set to Ryan J Ollos
Status: newassigned

Looks good. Thanks!

comment:6 by anonymous, 17 months 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

in reply to:  4 comment:7 by Ryan J Ollos, 17 months 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).
Last edited 17 months ago by Ryan J Ollos (previous) (diff)

comment:8 by Ryan J Ollos, 10 months ago

Milestone: 1.4.31.5.3

comment:9 by Ryan J Ollos, 7 months ago

Milestone: 1.5.31.5.4

comment:10 by Ryan J Ollos, 5 months ago

Milestone: 1.5.41.5.5

Modify Ticket

Change Properties
Set your email in Preferences
Action
as assigned The owner will remain Ryan J Ollos.
The ticket will be disowned. Next status will be 'new'.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from Ryan J Ollos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.