function _wysiwyg_tinymce_3_to_4_plugin_remap in Wysiwyg 7.2
Same name and namespace in other branches
- 6.2 editors/tinymce.inc \_wysiwyg_tinymce_3_to_4_plugin_remap()
Helper for converting plugins and buttons between TinyMCE 3 and 4.
1 call to _wysiwyg_tinymce_3_to_4_plugin_remap()
- _wysiwyg_tinymce_migrate_settings in editors/
tinymce.inc - Callback to migrate settings between known TinyMCE versions.
File
- editors/
tinymce.inc, line 1497 - Editor integration functions for TinyMCE.
Code
function _wysiwyg_tinymce_3_to_4_plugin_remap($plugin, $button) {
switch ($button) {
case 'link':
case 'unlink':
return array(
'link',
$button,
);
case 'justifyleft':
return array(
'default',
'alignleft',
);
case 'justifyright':
return array(
'default',
'alignright',
);
case 'justifycenter':
return array(
'default',
'aligncenter',
);
case 'justifyfull':
return array(
'default',
'alignjustify',
);
case 'anchor':
case 'image':
case 'code':
case 'charmap':
case 'cleanup':
case 'hr':
return array(
$button,
$button,
);
case 'forecolor':
case 'backcolor':
return array(
'textcolor',
$button,
);
case 'search':
case 'replace':
return array(
'searchreplace',
'searchreplace',
);
case 'emotions':
return array(
'emoticons',
'emoticons',
);
case 'sup':
return array(
'default',
'superscript',
);
case 'sub':
return array(
'default',
'subscript',
);
case 'selectall':
return array(
'default',
'selectall',
);
case 'tablecontrols':
return array(
'table',
'table',
);
case 'pasteword':
return array(
'paste',
'paste',
);
default:
return array(
$plugin,
$button,
);
}
}