You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
amis/demo/scripts/chunk/2794.249b94cf.js

2 lines
1.3 MiB

1 year ago
(self.webpackChunkamis_editor_demo=self.webpackChunkamis_editor_demo||[]).push([[2794],{62794:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return i}});var n=o(97582),r=o(67294),a=o(47575),s=o.n(a),i=(o(6890),o(38860),o(63557),o(14400),o(66884),o(15209),o(1236),o(72682),o(72170),o(39719),o(44446),o(82929),o(31295),o(644),o(88190),o(1080),o(73956),o(42540),o(38619),o(92936),o(43356),o(78843),o(73106),o(21449),o(31528),o(79835),o(35414),o(82960),function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.elementRef=r.createRef(),t}return(0,n.ZT)(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props.locale;this.config=(0,n.pi)((0,n.pi)({inline:!1,skin:!1,content_css:!1,height:400,language:t&&"zh-CN"!==t?"en":"zh_CN",branding:!1,plugins:["advlist","autolink","autoresize","link","image","lists","charmap","preview","anchor","pagebreak","searchreplace","wordcount","visualblocks","visualchars","code","fullscreen","insertdatetime","media","nonbreaking","table","emoticons","template","help","quickbars"],toolbar:"undo redo | blocks | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | preview media | fontfamily fontsize forecolor backcolor emoticons | print help",quickbars_selection_toolbar:"bold italic | link h2 h3 blockquote",quickbars_insert_toolbar:"quickimage quicktable",menu:{file:{title:"File",items:"newdocument restoredraft | preview | print "},edit:{title:"Edit",items:"undo redo | cut copy paste | selectall | searchreplace"},view:{title:"View",items:"code | visualaid visualchars visualblocks | preview fullscreen"},insert:{title:"Insert",items:"image link media template codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor toc | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | styles blocks fontsize align | forecolor backcolor | removeformat"},tools:{title:"Tools",items:"code wordcount"},table:{title:"Table",items:"inserttable | cell row column | tableprops deletetable"},help:{title:"Help",items:"help"}},paste_data_images:!0},this.props.config),{target:this.elementRef.current,readOnly:this.props.disabled,promotion:!1,setup:function(t){e.editor=t,t.on("init",(function(o){e.initEditor(o,t)}))}}),s().init(this.config)},t.prototype.componentDidUpdate=function(e){var t,o=this.props;o.model!==e.model&&o.model!==this.currentContent&&(null===(t=this.editor)||void 0===t||t.setContent(o.model||""))},t.prototype.componentWillUnmount=function(){s().remove(this.editor)},t.prototype.initEditor=function(e,t){var o=this,n=this.props,r=n.model,a=n.onModelChange,s=n.outputFormat,i=n.onFocus,l=n.onBlur,c=r||"";t.setContent(c),a&&t.on("change keyup setcontent",(function(e){var n=t.getContent({format:s});n!==o.currentContent&&(o.currentContent=n,a(n))})),i&&t.on("focus",i),l&&t.on("blur",l)},t.prototype.render=function(){return r.createElement("textarea",{ref:this.elementRef})},t.defaultProps={outputFormat:"html"},t}(r.Component));s().addI18n("zh_CN",{Redo:"重做",Undo:"撤销",Cut:"剪切",Copy:"复制",Paste:"粘贴","Select all":"全选","New document":"新文件",Ok:"确定",Cancel:"取消","Visual aids":"网格线",Bold:"粗体",Italic:"斜体",Underline:"下划线",Strikethrough:"删除线",Superscript:"上标",Subscript:"下标","Clear formatting":"清除格式","Align left":"左边对齐","Align center":"中间对齐","Align right":"右边对齐",Justify:"两端对齐","Bullet list":"项目符号","Numbered list":"编号列表","Decrease indent":"减少缩进","Increase indent":"增加缩进",Close:"关闭",Formats:"格式","Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.":"你的浏览器不支持打开剪贴板,请使用Ctrl+X/C/V等快捷键。",Headers:"标题","Header 1":"标题1","Header 2":"标题2","Header 3":"标题3","Header 4":"标题4","Header 5":"标题5","Header 6":"标题6",Headings:"标题","Heading 1":"标题1","Heading 2":"标题2","Heading 3":"标题3"