yii2-ueditor-widget icon indicating copy to clipboard operation
yii2-ueditor-widget copied to clipboard

如何做到官网demo中,复制内容不保留样式

Open benlee7 opened this issue 7 years ago • 0 comments

官网demo中,http://ueditor.baidu.com/website/onlinedemo.html,复制一段代码

<img p_id="3.jpg" src="http://www.ityimai.com/upload/ue/model/20170601/1496299971572417.jpg" style="margin: 0px 0px 0px -960px; padding: 0px; border: none; display: block; position: relative; left: 1268.67px; width: 983px; height: 428px; outline: 0px !important; -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;" width="983" height="428" border="0" vspace="0" title="" alt=""/>

后会自动变为

<img src="http://www.ityimai.com/upload/ue/model/20170601/1496299971572417.jpg" width="983" height="428" title="" alt=""/>

请问是怎么做到的?需要做哪些配置?

同时怎么把这些配置嵌入到yii2中的代码中,我得配置代码是

echo $form->field($model,'description')->widget('kucha\ueditor\UEditor',[ 'clientOptions' => [ 'toolbars' => [ [ 'fullscreen', 'source', 'undo', 'redo', '|', 'fontsize', 'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', '|', 'lineheight', '|', 'indent', '|', 'justifyleft', //居左对齐 'justifyright', //居右对齐 'justifycenter', '|',//居中对齐 'simpleupload', 'insertimage', 'insertvideo' ], ] ] ]);?>

benlee7 avatar Jun 01 '17 07:06 benlee7