Last modified: 2011-11-21 23:47:12 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T13018, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 11018 - Add ordered/unordered list buttons to edit toolbar
Add ordered/unordered list buttons to edit toolbar
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks: edit-toolbar
  Show dependency treegraph
 
Reported: 2007-08-21 20:48 UTC by Pedro de Medeiros
Modified: 2011-11-21 23:47 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
unordered/ordered list buttons support (6.63 KB, patch)
2007-08-21 20:48 UTC, Pedro de Medeiros
Details
Screenshot of the (un)ordered list buttons in the new WikiEditor toolbar (23.47 KB, image/png)
2011-11-21 23:47 UTC, Krinkle
Details

Description Pedro de Medeiros 2007-08-21 20:48:41 UTC
Created attachment 4024 [details]
unordered/ordered list buttons support

Mediawiki editor lacks a button for inserting markups for ordered/unordered lists. So I've created two extra buttons that should do the trick. When you edit a page, you can select a multi-line text and press a button to have each line of the selection prefixed with "#" or "*".

I know this patch is not complete yet (for instance, I haven't set i18n strings for it), but if there is enough interest I could make an improved version, following any standard needed to have it approved.

Additionally, this patch will need image buttons called button_ol.png and button_ul.png in the subdirectory /skins/common/images/
Comment 1 Danny B. 2007-08-22 00:02:27 UTC
Buttons already exist:

http://commons.wikimedia.org/wiki/Image:Btn_toolbar_enum.png
http://commons.wikimedia.org/wiki/Image:Btn_toolbar_liste.png

In case it won't be implemented in default settings, you can add it either in MediaWiki:Common.js or your personal Monobook.js.
Comment 2 Pedro de Medeiros 2007-08-28 19:40:18 UTC
Danny B,

it would not be enough to just change Common.js or Monobook.js. I had to change EditPage.php to create a new type of button, because I needed to insert wiki markup in a way that was not supported by current implementation. Consider this example:

(selected text bellow is between []s)

This is a list: [item1
item2
item3
item4]

The outcome is this after the ordered list button is pressed:

This is a list:
#item1
#item2
#item3
#item4

So my code actually puts the 'tagOpen' argument at the beginning of the selection and after each newline.
Comment 3 Danny B. 2007-08-29 00:51:49 UTC
Well, since edit buttons are pure javascript, I'm pretty sure these two buttons can be added without fiddling with any php, if it isn't/won't be in default set.

* one function for adding new button and its onclick event via DOM
* one function for handling the onclick event (adding of * or #)
Comment 4 Sumana Harihareswara 2011-11-09 23:54:55 UTC
Adding the "need-review" keyword to ask developers to review the patch.  Thank you for the patch, Pedro, and sorry for the wait!
Comment 5 Sam Reed (reedy) 2011-11-20 14:17:59 UTC
The old edit toolbar is deprecated and new features shouldn't be added to it.

RESOLVED WONTFIX
Comment 6 Krinkle 2011-11-21 23:47:12 UTC
Created attachment 9520 [details]
Screenshot of the (un)ordered list buttons in the new WikiEditor toolbar

No need to port this to the new editor. Attached is a screenshot the new WikiEditor, which has these by default.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links