Hi, everybody,
To meet specific needs of my wiki I modified the wikieditor toolbar by adding some buttons like this in MediaWiki:Common.js:
var customizeToolbar = function() {
// TOOLBAR
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'sections': {
'annotations': {
'type': 'toolbar',
'label': 'Annotations'
}
}
} );
//GROUP
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'section': 'annotations',
'groups': {
'properties': {
'label': 'Properties'
}
}
} );
//BUTTONS
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'section': 'annotations',
'group': 'properties',
'tools': {
'aka': {
label: 'Also know as',
type: 'button',
icon: 'http://example.com/w/images/aka.png',
action: {
type: 'encapsulate',
options: {
pre: "[[Is_also_known_as::",
post: "]]"
}
}
}
}
} );
and everything works great when I write/edit free text articles.
My question is why these buttons don't appear in the wikieditor toolbar of a form I created with:
|-valign="top"
|style="background:#ffdead;"|'''Tune Annotations:'''
|colspan="4"|{{{field|f_annotation|input type=textarea|rows=5|cols=180|editor=wikieditor|autogrow|placeholder=Put here Annotations/Comments/Discussion Topics/Anectodes/...}}}
And linked this way:
{{#formredlink:target=Annotation:{{PAGENAME}}|form=TuneAnnotation|link text={{PAGENAME}}}}
Any suggestions?
==WIKI INFO:==
+-------------------+---------------------------------------------------------+
MediaWiki 1.33.1 (d35fba2) 15:11, December 17, 2019
PHP 7.2.17-0ubuntu0.18.04.1 (apache2handler)
MariaDB 10.1.38-MariaDB-0ubuntu0.18.04.1
ICU 60.2
Elasticsearch 5.6.16
Lua 5.1.5
LilyPond 2.18.2
+-------------------+----------------------------------------------------------+
Page Forms 4.5 (3135f8f) 14:16, April 29, 2019
+-------------------+----------------------------------------------------------+
Thanks so much.
Valerio Pelliccioni
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
To meet specific needs of my wiki I modified the wikieditor toolbar by adding some buttons like this in MediaWiki:Common.js:
var customizeToolbar = function() {
// TOOLBAR
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'sections': {
'annotations': {
'type': 'toolbar',
'label': 'Annotations'
}
}
} );
//GROUP
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'section': 'annotations',
'groups': {
'properties': {
'label': 'Properties'
}
}
} );
//BUTTONS
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'section': 'annotations',
'group': 'properties',
'tools': {
'aka': {
label: 'Also know as',
type: 'button',
icon: 'http://example.com/w/images/aka.png',
action: {
type: 'encapsulate',
options: {
pre: "[[Is_also_known_as::",
post: "]]"
}
}
}
}
} );
and everything works great when I write/edit free text articles.
My question is why these buttons don't appear in the wikieditor toolbar of a form I created with:
|-valign="top"
|style="background:#ffdead;"|'''Tune Annotations:'''
|colspan="4"|{{{field|f_annotation|input type=textarea|rows=5|cols=180|editor=wikieditor|autogrow|placeholder=Put here Annotations/Comments/Discussion Topics/Anectodes/...}}}
And linked this way:
{{#formredlink:target=Annotation:{{PAGENAME}}|form=TuneAnnotation|link text={{PAGENAME}}}}
Any suggestions?
==WIKI INFO:==
+-------------------+---------------------------------------------------------+
MediaWiki 1.33.1 (d35fba2) 15:11, December 17, 2019
PHP 7.2.17-0ubuntu0.18.04.1 (apache2handler)
MariaDB 10.1.38-MariaDB-0ubuntu0.18.04.1
ICU 60.2
Elasticsearch 5.6.16
Lua 5.1.5
LilyPond 2.18.2
+-------------------+----------------------------------------------------------+
Page Forms 4.5 (3135f8f) 14:16, April 29, 2019
+-------------------+----------------------------------------------------------+
Thanks so much.
Valerio Pelliccioni
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l