Modify

Opened 15 years ago

Closed 12 years ago

Last modified 12 years ago

#4207 closed enhancement (fixed)

Formatting options

Reported by: izzy Owned by: Ryan J Ollos
Priority: normal Component: NoteBoxMacro
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

Would you consider adding some formatting options? What I have in mind are two optional parameters:

[[NoteBox(tip, This is a hint., 150, 30)]]

Would render the box with 150x30px. Without this, the boxes are too big sometimes - since they always reach onto the right border of the page. I guess it would also be possible to automatically calculate the right size - but that would be a bit harder to implement ;)

As for this, I guess the text to display needs to be "quoted" - at least when it contains a colon. Moreover, the "icon" may need to be resized for small x,y values.

Attachments (1)

WikiMacrosPage.png (36.7 KB) - added by Ryan J Ollos 12 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 13 years ago by Ryan J Ollos

Owner: changed from gruenebe to Ryan J Ollos
Status: newassigned

This is a good idea, and I'm happy to apply a patch if made available.

comment:2 Changed 12 years ago by Ryan J Ollos

Status: assignednew

Changed 12 years ago by Ryan J Ollos

Attachment: WikiMacrosPage.png added

comment:3 in reply to:  description Changed 12 years ago by Ryan J Ollos

Replying to izzy:

As for this, I guess the text to display needs to be "quoted" - at least when it contains a colon.

I think you mean comma, and this issue should have been dealt with in #4124, Commas need to be escaped with a backslash now.

I'd really like to implement your suggestion, however I don't know enough CSS to get this done in the near future, so it will have to wait until I have time to learn, unless someone kindly submits a patch.

Without this, the boxes are too big sometimes - since they always reach onto the right border of the page.

I find the NoteBoxPlugin page to be slightly misleading actually, because the noteboxes displayed are fairly narrow, and in fact they span most of the width of the page, as you described.

comment:4 Changed 12 years ago by Ryan J Ollos

Status: newassigned

Okay, maybe this isn't as difficult as I thought. I'll add a width parameter that can be specified in percent, and then maybe expand on this to allow the width to be specified in pixels.

comment:5 Changed 12 years ago by Ryan J Ollos

(In [11216]) Refs #4207: Added a third argument to specify the NoteBox width as a percent of the page width.

Note: This feature is experimental and subject to change before version 0.2 is released. It is likely that the width will be allowed to be specified in pixels as well as percent.

comment:6 in reply to:  description Changed 12 years ago by Ryan J Ollos

Replying to izzy:

Would render the box with 150x30px. Without this, the boxes are too big sometimes - since they always reach onto the right border of the page. I guess it would also be possible to automatically calculate the right size - but that would be a bit harder to implement ;)

Specifying the width is straightforward because the height will resize to fit the text. I'm not sure I see an advantage to specifying the height. I welcome feedback on this though.

comment:7 Changed 12 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

(In [11218]) Fixes #4207: Allow the width to be specified in pixels (e.g. 400px) or as a percentage of the page width (e.g. 50%).

comment:8 Changed 12 years ago by Ryan J Ollos

I think that I've satisfied the request in this ticket, but please reopen if you have additional ideas.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
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.