$imagesAvailable = $wgEnableUploads || count( $wgForeignFileRepos );
/**
-
- * toolarray an array of arrays which each include the filename of
- * the button image (without path), the opening tag, the closing tag,
- * and optionally a sample text that is inserted between the two when no
- * selection is highlighted.
- * The tip text is shown when the user moves the mouse over the button.
+ * $toolarray is an array of arrays each of which includes the
+ * filename of the button image (without path), the opening
+ * tag, the closing tag, optionally a sample text that is
+ * inserted between the two when no selection is highlighted
+ * and an option to select which switches the automatic
+ * selection of inserted text (default is true, see
+ * mw-editbutton-image). The tip text is shown when the user
+ * moves the mouse over the button.
*
- * Already here are accesskeys (key), which are not used yet until someone
- * can figure out a way to make them work in IE. However, we should make
- * sure these keys are not defined on the edit page.
+ * Also here: accesskeys (key), which are not used yet until
+ * someone can figure out a way to make them work in
+ * IE. However, we should make sure these keys are not defined
+ * on the edit page.
*/
$toolarray = array(
array(
'close' => ']]',
'sample' => wfMsg( 'image_sample' ),
'tip' => wfMsg( 'image_tip' ),
- 'key' => 'D'
+ 'key' => 'D',
+ 'select' => true
) : false,
$imagesAvailable ? array(
'image' => $wgLang->getImageFile( 'button-media' ),
continue;
}
+ if( !isset( $tool['select'] ) ) {
+ $tool['select'] = true;
+ }
+
$params = array(
$image = $wgStylePath . '/common/images/' . $tool['image'],
// Note that we use the tip both for the ALT tag and the TITLE tag of the image.