MediaWiki talk:Edittools

Edittools installation summary
You need sysop right to create and edit these files. Save everything, refresh your browser cache, then try editing some page. Those steps work for me at least. I get the edittools with button and drop down list. These instructions are gathered from the discussion below. Thanks for your comments.
 * very helpful! thank you! Igottheconch 20:25, 25 November 2011 (UTC)

Continuing issues with Form Button/Drop down - Solved!
(See the end of this post for solution)

I have tried the Edittools with CharInsert installed and showing on the Version page. Just as in the Edit page for this Discussion and others, the Standard character buttons appear below - but no drop-down to change to other style such as Arabic, Greek, etc.

I have done the following:


 * Installed CharInsert (shows on Version page and render the chars in a simple manner)
 * Because CharInsert nuked the Special page, I commented out

"$wgExtensionMessagesFiles['CharInsert'] = $dir . 'CharInsert.i18n.php';"

This also blocked the Js formatting from the changes as list below.


 * Created my own MediaWiki:Edittools and pasted the code from this MediaWiki:Edittools.
 * Created my own MediaWiki:Edittools.js and pasted code from the page with the same name here.
 * Created my own MediaWiki:Common.css and placed css section per the instructions.
 * Created my own MediaWiki:Common.js and have tried both calls to Edittools.js

Again, if you go to the Edit page for this Discussion page, my Edittools appear along the bottom the exact same way, except there is no drop-down box with Standard etc in it.

I have verified the $wgScript and $wgScriptPath (these are on a localhost - not yet uploaded to live server)

$wgScript = "/m/index.php"

$wgScriptPath = "/m"

What could I be missing?

Thanks!

Qaaz


 * Try checking function "includePage" in your MediaWiki:Common.js which should be the following::


 * --Kaganer 21:34, 27 May 2008 (UTC)

This doesn't work. I have been trying that and as many different variations of that as I could come up with - it simply does not make it work.

I see Edittools.js uses an event "onload". In Common.js for another extension, I use:

addOnloadHook(CustomizeModificationsOfSidebar);

Could this conflict?

Could there be something wrong with the code in MW:Edittools or Edittools.js? Are there any settings that need to be set correctly that could be different in your implementation and mine?

Thanks for your help!

P.S. Also I am using an extension for multiple uploads (Extensions:MultiUpload) - when I bring up that special page, the buttons also appear at the bottom of that page as well.


 * Qaaz

Based on my post and the two posters below having the similiar problem, I read the solution as "Try replace function "includePage" to custimised version:

function includePage( name )

The confusion arises in that both the original code had the call to the function but not the definition. I misunderstood the instructions as replace the old "includename" line of code with the new code! I need both obviously!! So the whole code to add to MediaWiki:Common.js is:

Works great now! Thanks for the great extension!


 * Qaaz
 * Congratulations on winning! I am going to rewrite this page to FAQ-style. --Kaganer 10:31, 29 May 2008 (UTC)

How do I disable this?
For hide (no traffic economy) this pane, add following string for your personal CSS file: For ability to disable Edittools need support this bug. --Kaganer 18:08, 17 December 2007 (UTC)

Form Button doesn't work on my Wiki
I just get the first set of options and no form or button. What am I missing here? Is it possible that this is due to the fact that I am using version 1.12alpha? Susan 17:38, 12 February 2008 (UTC)
 * This functionality almost "version-independent". For correctly working this toolbox (as is the case here) need following:
 * install extension Extension:CharInsert (supporting "charinsert" tag)
 * create MediaWiki:Edittools.js
 * place into MediaWiki:Common.js calling of MediaWiki:Edittools.js; as example, in section "Including extra .js pages" (swith "load_edittools" need set as "true"):


 * copy section "extra buttons for edit dialog" from MediaWiki:Common.css into your MediaWiki:Common.css (used for decorating Edittools buttons)
 * All these actions are fully implemented? --Kaganer 10:07, 13 February 2008 (UTC)
 * See also simple format this toolbox in w:en:MediaWiki:Edittools - without scripts; only Extension:CharInsert needed. --Kaganer 10:12, 13 February 2008 (UTC)
 * I have now implemented all of the above, and all of my choices now have buttons. However, the dropdown is still not appearing -- which is mainly what I wanted.  I copied all of MediaWiki:Common.js just in case.  Still no dropdown.  Susan 14:27, 13 February 2008 (UTC)
 * P.S., I have learned a lot, though.
 * Hmm. Check function "includePage" in MediaWiki:Common.js is return the correct path for called .js files - for your wiki. For mediawiki.org this function return path:
 * wgScript + '?title=' + name
 * where "wgScript" - variable, configuring through LocalSettings.php. Value by default: «{$wgScriptPath}/index.php», with default value of "$wgScriptPath" = «/wiki» (but on wikimedia projects value = «/w»).
 * Therefore, full correct path for mediawiki.org will be (name of called file ="MediaWiki:Edittools.js"):
 * /w/index.php?title=MediaWiki:Edittools.js
 * Please сheck these settings for your wiki. Or try purging cache...--Kaganer 18:49, 18 February 2008 (UTC)
 * I see your wiki. Correct result will be (before "&action...") = "/genwiki/index.php?title=MediaWiki:Edittools.js". Try replace function "includePage" to custimised version:


 * --Kaganer 19:05, 18 February 2008 (UTC)

....I tried hard, but I also failed to install it completely on http://wiki.gorebiobio.cl ....any idea what I might have done wrong? It s a pity because I like the drop down box much more than the long page with all characters....Thanks in advance for any hint. --Horst Salzwedel 01:11, 23 March 2008 (UTC)


 * I had the same problem, my drop down menu didn't show up, just the first standard character set. I cleared my browser cache and tadaa...! Cheers, --Till Kraemer 20:54, 22 March 2009 (UTC)

Nowiki
Any nowiki additions on here? -PatPeter,  MediaWiki Support Team  22:26, 1 March 2008 (UTC)
 * I not understand this question :( --Kaganer 19:43, 2 March 2008 (UTC)


 * The system message lists   but not      and  . -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  22:52, 11 March 2008 (UTC)

How do you install these js files
I am not understanding where you would install these js files to work. Do I generate the js files and place them in the wiki root? What file do I add there call to? Index.php in the wiki root?

More information would be helpful.

24.249.248.8 11/17/2008 djdubuque
 * No. Needed
 * create on your wiki standard editable wiki-page with name MediaWiki:Gadget-Edittools.js (sysop rights required)
 * create MediaWiki:Gadget-site.js (standard editable wiki-page)
 * add edittools definition into MediaWiki:Gadgets-definition and description into Special:Gadgets

Tutorial
I had the same question and the linked tutorial gives very detailed steps. Only in step 4 the wording must be adapted to "Styling for links generated by MediaWiki:Edittools"-section.

Although some of the pages used there have been moved, the code is most likely the same and it is functional.

Sm8ps (talk) 23:02, 14 August 2013 (UTC)
 * OK, thanks. --Kaganer (talk) 20:04, 30 August 2013 (UTC)

Current setup procedure
Tested in February 2017 --Escalatr (talk) 10:44, 15 February 2017 (UTC)
 * 1) Install CharInsert extension Extension:CharInsert
 * 2) Create the gadget pages
 * 3) * Create MediaWiki:Gadget-Edittools
 * 4) * Create MediaWiki:Gadget-Edittools.js
 * 5) * Create MediaWiki:Edittools
 * 6) CSS: add the appropriate style lines from https://www.mediawiki.org/wiki/Extension:CharInsert#Styling or MediaWiki:Gadget-site.css to your MediaWiki:Common.css
 * 7) Add gadget entry to MediaWiki:Gadgets-definition
 * 8) English Wikipedia uses a slightly different setup, check Extension:CharInsert
 * 1) English Wikipedia uses a slightly different setup, check Extension:CharInsert

Problem on preview after changing Edittools
I followed all the points of Form Button doesn't work on my Wiki to use the Edittools and Charinsert, they works on edit but when I try to show the preview the connection to the server is cancelled. I don't know if I missed something or I made an error on configuration. My server has the following software installed: MediaWiki 1.13.3, PHP 5.2.0 (apache2handler), MySQL 5.0.27-community-log

EDIT: Seem that the problem occurs only on pages which weight more than 9KB

Thank you for any help, Wolf01

Missed Step
I had to do this in my LocalSettings.php file:

require_once("$IP/extensions/CharInsert/CharInsert.php");
 * This step is required in the CharInsert installation instruction :) Fabricebaro 20:32, 19 January 2010 (UTC)
 * I'd like to see complete babysteps within single page (either here or on CharInsert page). Also, there is probably one more missing step, because internationalization didnt work despite of language listed in the i18n file. 23:45, 1 August 2010 (UTC)

spcae in chars
is it possible i add + button? vahid 14:28, 11 April 2010 (UTC)
 * only over {{subst:rtl}} / {{subst:ltr}} construction, ok? Space character between "div" and "dir" is prevents the normal work of Charinsert Extension (replacement to html-acronym does not solve the problem). --Kaganer 21:15, 11 April 2010 (UTC)

English Wikipedia–style Edittools
Can anybody tell me how to get the special characters toolbar exactly like the one in English Wikipedia? I installed the CharInsert extension and tried copying the code from MediaWiki:Edittools and MediaWiki:Edittools.js but it just seemed to ignore the latter. I didn't see any CSS references in it that I would need to copy as well (i.e. something from MediaWiki:Common.js). –CWenger 22:14, 4 May 2011 (UTC)
 * In the en-wiki Edittools.js is called from Editpage.js, which is called from Common.js/edit.js, which is called from Common.js ;) --Kaganer 17:55, 5 May 2011 (UTC)
 * Of course! Not sure how I missed this obvious configuration. :-) –CWenger 21:22, 6 May 2011 (UTC)
 * Now worked? More help is needed? --Kaganer 10:35, 11 May 2011 (UTC)


 * Hi. I hope it's not a long shot, but is it possible for another Wikipedia to use the very same WP-en Edittools, with buttons as in MW? --Zack 12:35, 28 August 2011 (UTC)
 * Only buttons style from MW? I think it's not very difficult. --Kaganer 13:03, 28 August 2011 (UTC)
 * Well, in the WP-en, you can switch between Edittools contents using using downward pointing arrow, plus when you preview/refresh your page, the content doesn't change. --Zack 13:45, 28 August 2011 (UTC)
 * Excuse me, but I probably do not fully understand your problem. You do not work properly switching between items in the drop-down list in the en-WP? I do not watch this problem (in Google Chrome) in the en-WP or this wiki. Or a problem on another site with "en-WP-style" EditTools? I do not have access to edit the system messages in the en-WP, please contact with en-WP admins. If about another website - please give URL. NB: For using drop-down list need to have your browser has been enabled Javascript. This is done? --Kaganer 16:46, 28 August 2011 (UTC)
 * I'll explain:) In the Edittools of Mediawiki, when I want to go for example from Standard to Latin, I have to click Standard so as for the menu to appear, and then click again on Latin. However, in the English Wikipedia, I just have to use the up/down arrow to choose and the content appears automatically, and I don't have to click or press Enter. What I want to know for now is: What do I have to do to use the WP-en Edittools style in my home Wikipedia? Do I just have to copy Mediawiki:Edittools and Mediawiki:Edittools.js or is there any thing else?--Zack 18:23, 28 August 2011 (UTC)

Please add ẞ
Please add the uppercase sharp s (ẞ) to MediaWiki:Edittools. it appears at two places, which I've copied here and updated, so you should be able to copy&paste the two altered lines from here:

&lt;p class="specialbasic" id="Latin" style="display:none"> &hellip; &lt;charinsert>ß ẞ &lt;/charinsert> ·

&lt;p class="specialbasic" id="German" style="display:none"> &lt;charinsert>Ä ä Ö ö Ü ü ß ẞ&lt;/charinsert> &lt;/p>

Thank you --Purodha Blissenbach 11:27, 14 January 2012 (UTC)
 * ✅ by Petrb. --Kaganer (talk) 12:20, 29 February 2012 (UTC)


 * What is that character? It doesn't render on my Windows Vista machine running FireFox 19.0.2 — T13   ( C • M • Click to learn how to view this signature as intended ) 13:37, 28 March 2013 (UTC)
 * Please select "Latin" item in the expanded menu. --Kaganer (talk) 17:29, 28 March 2013 (UTC)
 * All I see is a little box with 1E on top of 9E inside it. — T13  ( C • M • Click to learn how to view this signature as intended ) 17:48, 28 March 2013 (UTC)
 * I don't understand. Please give me link to screnshoot. --Kaganer (talk) 19:37, 28 March 2013 (UTC)

Problems defining some wiki markup tools.
In an older version of MW (1.9.3) I was using MediaWiki:Edittools to define some tools to help in editing.

The entry above would allow me to mark some text and wrap the ... around some text. Recently I needed to move the wiki and upgraded to version 1.19.1... only to find that the command above does not work properly. It would seem that the "& #32;" is no longer recognized and so it breaks up the command into two entries.

I searched this site and found some text saying that the Font command had been depreciated... and I should use ... instead. Unfortunately I need the "& #32;" for this too. Does anyone know of a workaround for this?--TDeeming (talk) 13:23, 17 July 2012 (UTC)


 * I see this bug. There is a reason why you need to insert a direct html-formatting instead of using of wiki-template? --Kaganer (talk) 14:14, 17 July 2012 (UTC)
 * While the changes you made to the MediaWiki:Edittools look okay on the page itself. When it is used on another page...like this one... the buttons are broken at the space between.
 * Yes, I are seen. New bugreport is already opened. --Kaganer (talk) 09:47, 18 July 2012 (UTC)
 * In regards to your answer... I am not sure what you mean about using of wiki-template. Can you explain... Thanks --TDeeming (talk) 06:04, 18 July 2012 (UTC)
 * Standard solution for this case:
 * Create page in the namespace "Template:", with his name like "Template:Red" and code:
 * Add into MediaWiki:Edittools new section with code 
 * See new example in the Edittools here ("Standard" section, right button). Why not do so? --Kaganer (talk) 09:47, 18 July 2012 (UTC)
 * Thanks for teaching me! This works great and I think I can use it for my other shortcuts too! It is also probably more understandable to other users too. --TDeeming (talk) 10:10, 18 July 2012 (UTC)
 * great, best wishes ;) --Kaganer (talk) 10:25, 18 July 2012 (UTC)
 * ✅, but bug with using of "& #32;" is still exist and should be fixed. --Kaganer (talk) 10:25, 18 July 2012 (UTC)
 * Solution: You have to enclose templates and spaces inside "nowiki" if they should become one button. See example made by User:Krinkle (removed from current version).

How do I create a multiple word button with spaces in it?
How do I create a single button for Foo Button with the space in the middle? I have a few templates with more than one word on my wiki I would like to create buttons for like "Feather Falling" and "Boon of Undeath". -- ShoeMaker  ( Contributions &bull; Message )   01:49, 23 July 2012 (UTC)
 * By deafault, separate different symbols by space, each symbol will become a separate button. You have to enclose templates and spaces inside "nowiki" if they should become one button. See example made by User:Krinkle (removed from current version). --Kaganer (talk) 08:43, 23 July 2012 (UTC)

Personalising
Is it possible for users to personalise edit tools, just as one can customise Common.js? Remigiu (talk) 16:49, 30 September 2012 (UTC)
 * I came to ask the same. –Quiddity (talk) 01:41, 9 May 2014 (UTC)
 * Me too. Noone knows? --Wesalius (talk) 13:06, 30 August 2014 (UTC)

Edit request
I'm using this on my wiki and have found that this line · requires nowiki tags around the &-n-b-s-p-; - otherwise you don't get a non-breaking space.
 * ✅. Thanks! --Kaganer (talk) 20:31, 13 January 2013 (UTC)

redundant &nbsp
Please remove trailing &-n-b-s-p; in line 5 -- it breaks down alignment of the corresponding line of Edittools buttons. Hinote (talk) 12:26, 14 July 2013 (UTC)
 * I do not see a problem. Please provide a screenshot or a more detailed explain of your case. --Kaganer (talk) 15:23, 18 July 2013 (UTC)

Move Edittools just below the edit window or summary

 * Hi, im a newbie and thanks to the discussion here i was able to successfully install the Editools. However, the layout seems awkward to me as the edittools is located below the Save page buttons, etc.  How can I change it's layout and move it just below the edit window or summary box?  Thank you. Fcnanawa (talk) 07:06, 29 October 2013 (UTC)

→ User: Perhelion 12:52, 21 May 2018 (UTC)
 * I face the same problem. Wikipedia has placed the charinsert in a nice place. Even Mediawiki has it at the bottom after the save botton. It's not convenient to use it without scrolling down, clicking, then scrolling up back to the edit box. It would better be off Right below the edit box. I've tried searching Wikipedia but no clue. Do we have to modify Common.css? Abhinav paulite (talk) 21:54, 21 August 2014 (UTC)
 * Reup the earlier queries. Is it possible to move the Edittools box to ABOVE the edit window? ElectricRay (talk) 14:40, 9 May 2018 (UTC)
 * Here is a js code as how a gadget could look like (now as script file):
 * thank you! ElectricRay (talk) 16:23, 28 May 2018 (UTC)

Add strikethrough
Hi. Please add this to the end of the Standard section (after DEFAULTSORT): and 2) add  at the end of the two lines above (translation and DEFAULTSORT).

Thanks. (And/or solve above. :) –Quiddity (talk) 01:48, 9 May 2014 (UTC)
 * Quiddity, ✅ --Kaganer (talk) 23:37, 17 March 2015 (UTC)

How Do I Get This To Work?
Also, Can you move Ø and ø to the other stroke letters --The Brynda1231 |Talc page 16:45, 17 April 2017 (UTC)

Can you add Hirigana and Katakana? ---The Brynda1231 |Talc page 16:50, 17 April 2017 (UTC)