public function UEditor::getDefaultSettings in UEditor - 百度编辑器 8
Returns the default settings for this configurable text editor.
Return value
array An array of settings as they would be stored by a configured text editor entity (\Drupal\editor\Entity\Editor).
Overrides EditorBase::getDefaultSettings
File
- src/
Plugin/ Editor/ UEditor.php, line 105
Class
- UEditor
- Defines a UEditor-based text editor for Drupal.
Namespace
Drupal\ueditor\Plugin\EditorCode
public function getDefaultSettings() {
$settings['language'] = 'en';
$settings['initial_content'] = '';
$settings['zindex'] = 500;
$settings['initialFrameHeight'] = 320;
$settings['auto_height'] = TRUE;
$settings['auto_float'] = TRUE;
$settings['allowdivtop'] = FALSE;
$settings['show_elementpath'] = TRUE;
$settings['show_wordcount'] = TRUE;
$settings['imagePathFormat'] = '/%b%f/ueditor/%u/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}';
$settings['scrawlPathFormat'] = '/%b%f/ueditor/%u/upload/scrawl/{yyyy}{mm}{dd}/{time}{rand:6}';
$settings['filePathFormat'] = '/%b%f/ueditor/%u/upload/file/{yyyy}{mm}{dd}/{time}{rand:6}';
$settings['fileManagerListPath'] = '/%b%f/ueditor/%u/upload/file/';
$settings['catcherPathFormat'] = '/%b%f/ueditor/%u/upload/catcher/{yyyy}{mm}{dd}/{time}{rand:6}';
$settings['imageManagerListPath'] = '/%b%f/ueditor/%u/upload/image/';
$settings['snapscreenPathFormat'] = '/%b%f/ueditor/%u/upload/snapscreen/{yyyy}{mm}{dd}/{time}{rand:6}';
$settings['videoPathFormat'] = '/%b%f/ueditor/upload/%u/video/{yyyy}{mm}{dd}/{time}{rand:6}';
$settings['toolbars'] = 'fullscreen,source,|,undo,redo,|,bold,italic,underline,fontborder,strikethrough,superscript,subscript,removeformat,formatmatch,autotypeset,blockquote,pasteplain,|,forecolor,backcolor,insertorderedlist,insertunorderedlist,selectall,cleardoc,|,rowspacingtop,rowspacingbottom,lineheight,|,customstyle,paragraph,fontfamily,fontsize,|,directionalityltr,directionalityrtl,indent,|,justifyleft,justifycenter,justifyright,justifyjustify,|,touppercase,tolowercase,|,link,unlink,anchor,|,imagenone,imageleft,imageright,imagecenter,|,simpleupload,insertimage,emotion,scrawl,insertvideo,music,attachment,map,gmap,insertframe,insertcode,webapp,pagebreak,template,background,|,horizontal,date,time,spechars,snapscreen,wordimage,|,inserttable,deletetable,insertparagraphbeforetable,insertrow,deleterow,insertcol,deletecol,mergecells,mergeright,mergedown,splittocells,splittorows,splittocols,charts,|,print,preview,searchreplace,help,drafts';
if (isset($this->global_settings['ueditor_enable_formula_editor']) && $this->global_settings['ueditor_enable_formula_editor']) {
$settings['toolbars'] .= ',kityformula';
}
return $settings;
}