Modify

Opened 14 years ago

Closed 14 years ago

#6697 closed enhancement (fixed)

I would be nice to be able to set the title of the box ...

Reported by: anonymous Owned by: Alexander Slesarev
Priority: normal Component: CodeExampleMacro
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

In a page with a lot of CodeExamples, having the possibility to replace Example (or Correct example, ...) by your own text would be a must.

Attachments (1)

title.png (32.5 KB) - added by Alexander Slesarev 14 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 Changed 14 years ago by Ryan J Ollos

Seems like a reasonably useful enhancement. Now that the SELECT_ALL is shown on the right side of the box, a user-specified title could be displayed such as EXAMPLE: My example, rather than just EXAMPLE: ... and so forth for the other macros. Or perhaps replace the EXAMPLE: text entirely with user-defined text.

Changed 14 years ago by Alexander Slesarev

Attachment: title.png added

comment:2 Changed 14 years ago by Alexander Slesarev

Resolution: fixed
Status: newclosed

Fixed in r9204

Sample usage (see the title parameter):

{{{
#!CodeExample
## type = good
## title = Fibonacci implementation in Haskell
#!haskell
fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
}}}

It will be rendered as:

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Alexander Slesarev.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.