Modify

Opened 6 years ago

Closed 3 years ago

Last modified 3 years ago

#4207 closed enhancement (fixed)

Formatting options

Reported by: izzy Owned by: rjollos
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 rjollos 3 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 3 years ago by rjollos

  • Owner changed from gruenebe to rjollos
  • Status changed from new to assigned

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

comment:2 Changed 3 years ago by rjollos

  • Status changed from assigned to new

Changed 3 years ago by rjollos

comment:3 in reply to: ↑ description Changed 3 years ago by rjollos

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 3 years ago by rjollos

  • Status changed from new to assigned

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 3 years ago by rjollos

(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 3 years ago by rjollos

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 3 years ago by rjollos

  • Resolution set to fixed
  • Status changed from assigned to closed

(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 3 years ago by rjollos

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

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.