tinymce按钮排列
Tinymce button arangement
以下是我的 TinyMCE 文本区域代码,但我想将显示的按钮编辑成整齐的部分。我在下面找到了一些格式很好的代码。关于如何将格式(按钮分组和行)复制为以下代码的任何想法。
我的代码
<?php $content = ''; $editor_id = 'txtArea'; wp_editor( $content, $editor_id, $settings = array(
'editor_class'=>'ckeditor',
'media_buttons'=>false,
'quicktags'=>false,
'tinymce' => array(
'theme_advanced_buttons1' => ,
'theme_advanced_buttons2' => ,
'theme_advanced_buttons3' => ,
'theme_advanced_buttons4' => ,
我找到的格式化代码
{ name: 'format', items : [ 'Format','Font','FontSize' ] },
{ name: 'colors', items : [ 'TextColor','BGColor' ] },
{ name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
{ name: 'editing', items : [ 'Find','Replace','-','SelectAll'] },
{ name: 'tools', items : [ 'Maximize'] },
'/',
{ name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
{ name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv',
'-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'] },
{ name: 'links', items : [ 'Link','Unlink','Anchor' ] },
{ name: 'source', items : [ 'Source'] }
提前感谢您的帮助
我想我找到了自己的答案,因为它似乎有效
<?php $content = ''; $editor_id = 'txtArea'; wp_editor( $content, $editor_id, $settings = array(
'editor_class'=>'ckeditor',
'media_buttons'=>false,
'quicktags'=>false,
//'tinymce' => array(
//'theme_advanced_buttons1' =>'' ,
//'theme_advanced_buttons2' =>'' ,
//'theme_advanced_buttons3' =>'' ,
//'theme_advanced_buttons4' =>'')
));?>
<script>
CKEDITOR.replace('txtArea', {toolbar:'Standard'});
CKEDITOR.editorConfig = function( config ) {
config.toolbar_Standard = [
{ name: 'format', items : [ 'Format','Font','FontSize' ] },
{ name: 'colors', items : [ 'TextColor','BGColor' ] },
{ name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
{ name: 'editing', items : [ 'Find','Replace','-','SelectAll'] },
{ name: 'tools', items : [ 'Maximize'] },
'/',
{ name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
{ name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv',
'-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'] },
{ name: 'links', items : [ 'Link','Unlink','Anchor' ] },
{ name: 'source', items : [ 'Source'] }
];
};
</script>
它可能不是世界上最漂亮的代码,但只要它有效:)
以下是我的 TinyMCE 文本区域代码,但我想将显示的按钮编辑成整齐的部分。我在下面找到了一些格式很好的代码。关于如何将格式(按钮分组和行)复制为以下代码的任何想法。
我的代码
<?php $content = ''; $editor_id = 'txtArea'; wp_editor( $content, $editor_id, $settings = array(
'editor_class'=>'ckeditor',
'media_buttons'=>false,
'quicktags'=>false,
'tinymce' => array(
'theme_advanced_buttons1' => ,
'theme_advanced_buttons2' => ,
'theme_advanced_buttons3' => ,
'theme_advanced_buttons4' => ,
我找到的格式化代码
{ name: 'format', items : [ 'Format','Font','FontSize' ] },
{ name: 'colors', items : [ 'TextColor','BGColor' ] },
{ name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
{ name: 'editing', items : [ 'Find','Replace','-','SelectAll'] },
{ name: 'tools', items : [ 'Maximize'] },
'/',
{ name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
{ name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv',
'-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'] },
{ name: 'links', items : [ 'Link','Unlink','Anchor' ] },
{ name: 'source', items : [ 'Source'] }
提前感谢您的帮助
我想我找到了自己的答案,因为它似乎有效
<?php $content = ''; $editor_id = 'txtArea'; wp_editor( $content, $editor_id, $settings = array(
'editor_class'=>'ckeditor',
'media_buttons'=>false,
'quicktags'=>false,
//'tinymce' => array(
//'theme_advanced_buttons1' =>'' ,
//'theme_advanced_buttons2' =>'' ,
//'theme_advanced_buttons3' =>'' ,
//'theme_advanced_buttons4' =>'')
));?>
<script>
CKEDITOR.replace('txtArea', {toolbar:'Standard'});
CKEDITOR.editorConfig = function( config ) {
config.toolbar_Standard = [
{ name: 'format', items : [ 'Format','Font','FontSize' ] },
{ name: 'colors', items : [ 'TextColor','BGColor' ] },
{ name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
{ name: 'editing', items : [ 'Find','Replace','-','SelectAll'] },
{ name: 'tools', items : [ 'Maximize'] },
'/',
{ name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
{ name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv',
'-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'] },
{ name: 'links', items : [ 'Link','Unlink','Anchor' ] },
{ name: 'source', items : [ 'Source'] }
];
};
</script>
它可能不是世界上最漂亮的代码,但只要它有效:)