Hello guys,
I'm working with the new editor from Usability extension. Tough I miss some extra buttons that insert some code snippets that I'd like to include. How can I do this?
Is there any documentation about this?
Thank you in advance.
robert
orschiro wrote:
Hello guys,
I'm working with the new editor from Usability extension. Tough I miss some extra buttons that insert some code snippets that I'd like to include. How can I do this?
Is there any documentation about this?
Thank you in advance.
robert
There is a bit in http://usability.wikimedia.org/wiki/Toolbar_customization but nonetheless I found it hard to do, because it tries to be so flexible.
Example for inserting <code> tags:
if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) { // Add in the advanced toolbar $j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { 'section': 'advanced', 'group': 'insert', 'tools': { 'ResponseHeader': { icon: 'http://upload.wikimedia.org/wikipedia/commons/2/21/Button_invalid_template.p...', 'type': 'button', 'label': '<code>', action: { type: 'encapsulate', options: { pre: "<code>" post: "</code>" } } } } } ); } ); }
Hello Platonides,
I looked into it but haven't found any information which file I have to edit. Could you help me out please?
Thank you.
2010/8/29 Platonides Platonides@gmail.com:
orschiro wrote:
Hello guys,
I'm working with the new editor from Usability extension. Tough I miss some extra buttons that insert some code snippets that I'd like to include. How can I do this?
Is there any documentation about this?
Thank you in advance.
robert
There is a bit in http://usability.wikimedia.org/wiki/Toolbar_customization but nonetheless I found it hard to do, because it tries to be so flexible.
Example for inserting <code> tags:
if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) { // Add in the advanced toolbar $j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { 'section': 'advanced', 'group': 'insert', 'tools': { 'ResponseHeader': { icon: 'http://upload.wikimedia.org/wikipedia/commons/2/21/Button_invalid_template.p...', 'type': 'button', 'label': '<code>', action: { type: 'encapsulate', options: { pre: "<code>" post: "</code>" } } } } } ); } ); }
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki:Vector.js maybe? Just a guess, since it seems logical..
-- Lewis Cawte (Lcawte) On 29/08/10 20:42, orschiro@googlemail.com wrote:
Hello Platonides,
I looked into it but haven't found any information which file I have to edit. Could you help me out please?
Thank you.
2010/8/29 PlatonidesPlatonides@gmail.com:
orschiro wrote:
Hello guys,
I'm working with the new editor from Usability extension. Tough I miss some extra buttons that insert some code snippets that I'd like to include. How can I do this?
Is there any documentation about this?
Thank you in advance.
robert
There is a bit in http://usability.wikimedia.org/wiki/Toolbar_customization but nonetheless I found it hard to do, because it tries to be so flexible.
Example for inserting<code> tags:
if ( typeof $j != 'undefined'&& typeof $j.fn.wikiEditor != 'undefined' ) { // Add in the advanced toolbar $j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { 'section': 'advanced', 'group': 'insert', 'tools': { 'ResponseHeader': { icon: 'http://upload.wikimedia.org/wikipedia/commons/2/21/Button_invalid_template.p...', 'type': 'button', 'label': '<code>', action: { type: 'encapsulate', options: { pre: "<code>" post: "</code>" } } } } } ); } ); }
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
-- Lewis Cawte (Lcawte) On 29/08/10 20:42, orschiro@googlemail.com wrote:
Hello Platonides,
I looked into it but haven't found any information which file I have to edit. Could you help me out please?
Thank you.
Lewis Cawte wrote:
MediaWiki:Vector.js maybe? Just a guess, since it seems logical..
Yes. MediaWiki:Vector.js
Hello guys,
I edited Vector.js like you said but the button still doesn' show up. What else could I try?
Regards
2010/8/30 Platonides Platonides@gmail.com:
-- Lewis Cawte (Lcawte) On 29/08/10 20:42, orschiro@googlemail.com wrote:
Hello Platonides,
I looked into it but haven't found any information which file I have to edit. Could you help me out please?
Thank you.
Lewis Cawte wrote:
MediaWiki:Vector.js maybe? Just a guess, since it seems logical..
Yes. MediaWiki:Vector.js
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Did you clear your cache? Also, are you certain your syntax is right..
-- Lewis Cawte
On 30/08/10 20:06, orschiro@googlemail.com wrote:
Hello guys,
I edited Vector.js like you said but the button still doesn' show up. What else could I try?
Regards
2010/8/30 PlatonidesPlatonides@gmail.com:
-- Lewis Cawte (Lcawte) On 29/08/10 20:42, orschiro@googlemail.com wrote:
Hello Platonides,
I looked into it but haven't found any information which file I have to edit. Could you help me out please?
Thank you.
Lewis Cawte wrote:
MediaWiki:Vector.js maybe? Just a guess, since it seems logical..
Yes. MediaWiki:Vector.js
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Yes, I checked both and both should make no problem.
Furthermore I have activated the following options in my profile (german sorry).
- Erweiterte Bearbeiten-Werkzeugleiste aktivieren - Dialoge aktivieren für das Einfügen von Links, Tabellen und mehr
Regards
rob
2010/8/30 Lewis Cawte lewiscawte@googlemail.com:
Did you clear your cache? Also, are you certain your syntax is right..
-- Lewis Cawte
On 30/08/10 20:06, orschiro@googlemail.com wrote:
Hello guys,
I edited Vector.js like you said but the button still doesn' show up. What else could I try?
Regards
2010/8/30 PlatonidesPlatonides@gmail.com:
-- Lewis Cawte (Lcawte) On 29/08/10 20:42, orschiro@googlemail.com wrote:
Hello Platonides,
I looked into it but haven't found any information which file I have to edit. Could you help me out please?
Thank you.
Lewis Cawte wrote:
MediaWiki:Vector.js maybe? Just a guess, since it seems logical..
Yes. MediaWiki:Vector.js
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
orschiro@googlemail.com wrote:
Hello guys,
I edited Vector.js like you said but the button still doesn' show up. What else could I try?
Regards
Is it at a wiki we could look at?
Of course, here is some example:
http://wiki.ziesche.de/w/index.php?title=Hauptseite&action=edit
And my Vector.js:
http://wiki.ziesche.de/wiki/MediaWiki:Vector.js
Regards
2010/8/30 Platonides Platonides@gmail.com:
orschiro@googlemail.com wrote:
Hello guys,
I edited Vector.js like you said but the button still doesn' show up. What else could I try?
Regards
Is it at a wiki we could look at?
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
orschiro@googlemail.com wrote:
Of course, here is some example:
http://wiki.ziesche.de/w/index.php?title=Hauptseite&action=edit
And my Vector.js:
http://wiki.ziesche.de/wiki/MediaWiki:Vector.js
Regards
Enclose it in an addOnloadHook() or j( document ).ready() ie. addOnloadHook( function() { .... } ); Where .... is the previous code.
OK, I adapted my Vector.js.
http://wiki.ziesche.de/w/index.php?title=MediaWiki:Vector.js
Unfortunately it still doesn't work.
2010/8/31 Platonides Platonides@gmail.com:
orschiro@googlemail.com wrote:
Of course, here is some example:
http://wiki.ziesche.de/w/index.php?title=Hauptseite&action=edit
And my Vector.js:
http://wiki.ziesche.de/wiki/MediaWiki:Vector.js
Regards
Enclose it in an addOnloadHook() or j( document ).ready() ie. addOnloadHook( function() { .... } ); Where .... is the previous code.
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
orschiro@googlemail.com wrote:
OK, I adapted my Vector.js.
http://wiki.ziesche.de/w/index.php?title=MediaWiki:Vector.js
Unfortunately it still doesn't work.
Oh, there's a missing comma (,) between pre: "<code>" and post: "</code>"
Hmm thanks I changed it but got still no luck. Ideas?
2010/8/31 Platonides Platonides@gmail.com:
orschiro@googlemail.com wrote:
OK, I adapted my Vector.js.
http://wiki.ziesche.de/w/index.php?title=MediaWiki:Vector.js
Unfortunately it still doesn't work.
Oh, there's a missing comma (,) between pre: "<code>" and post: "</code>"
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
I just found out that wikipedia extended there editor too. They have additional buttons, for example to avoid wiki-formatting. The strange thing is that there Vector.js does not need any customisation: http://de.wikipedia.org/wiki/MediaWiki:Vector.js
How do they do that?
Regards
2010/9/1 orschiro@gmail.com:
Hmm thanks I changed it but got still no luck. Ideas?
2010/8/31 Platonides Platonides@gmail.com:
orschiro@googlemail.com wrote:
OK, I adapted my Vector.js.
http://wiki.ziesche.de/w/index.php?title=MediaWiki:Vector.js
Unfortunately it still doesn't work.
Oh, there's a missing comma (,) between pre: "<code>" and post: "</code>"
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Ok guys,
now I use the latest development trunk of the UsabilityInitiative but the additional button still doesn't appear.
Any further ideas?
Here once again my vector.js: http://wiki.ziesche.de/wiki/MediaWiki:Vector.js
robert
2010/9/2 orschiro@gmail.com:
I just found out that wikipedia extended there editor too. They have additional buttons, for example to avoid wiki-formatting. The strange thing is that there Vector.js does not need any customisation: http://de.wikipedia.org/wiki/MediaWiki:Vector.js
How do they do that?
Regards
2010/9/1 orschiro@gmail.com:
Hmm thanks I changed it but got still no luck. Ideas?
2010/8/31 Platonides Platonides@gmail.com:
orschiro@googlemail.com wrote:
OK, I adapted my Vector.js.
http://wiki.ziesche.de/w/index.php?title=MediaWiki:Vector.js
Unfortunately it still doesn't work.
Oh, there's a missing comma (,) between pre: "<code>" and post: "</code>"
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
orschiro@googlemail.com wrote:
Ok guys,
now I use the latest development trunk of the UsabilityInitiative but the additional button still doesn't appear.
Any further ideas?
Here once again my vector.js: http://wiki.ziesche.de/wiki/MediaWiki:Vector.js
robert
Your braces are wrong. Replace it with this: addOnloadHook( function() { if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) { // Add in the advanced toolbar $j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { 'section': 'advanced', 'group': 'insert', 'tools': { 'Code': { icon: 'http://upload.wikimedia.org/wikipedia/commons/2/21/Button_invalid_template.p...', 'type': 'button', 'label': '<code>', action: { type: 'encapsulate', options: { pre: "<code>", post: "</code>" } } } } } ); } } );
I really need a syntax highlighter. *g*
Is it now correct? http://wiki.ziesche.de/wiki/MediaWiki:Vector.js
Though the button doesn't appear.
robert
2010/9/10 Platonides Platonides@gmail.com:
orschiro@googlemail.com wrote:
Ok guys,
now I use the latest development trunk of the UsabilityInitiative but the additional button still doesn't appear.
Any further ideas?
Here once again my vector.js: http://wiki.ziesche.de/wiki/MediaWiki:Vector.js
robert
Your braces are wrong. Replace it with this: addOnloadHook( function() { if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) { // Add in the advanced toolbar $j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { 'section': 'advanced', 'group': 'insert', 'tools': { 'Code': { icon: 'http://upload.wikimedia.org/wikipedia/commons/2/21/Button_invalid_template.p...', 'type': 'button', 'label': '<code>', action: { type: 'encapsulate', options: { pre: "<code>", post: "</code>" } } } } } ); } } );
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
orschiro@googlemail.com wrote:
I really need a syntax highlighter. *g*
Is it now correct? http://wiki.ziesche.de/wiki/MediaWiki:Vector.js
Though the button doesn't appear.
robert
It looks ok. :S At least, the Opinions tab appears now that there isn't a javascript error there (you will want to customize the Main_Page, Wikinews:Commentary_pages_on_news_events/body ...).
mediawiki-l@lists.wikimedia.org