关于laravel-admin ueditor 集成并解决刷新的问题
吾爱主题
阅读:163
2021-09-08 15:39:00
评论:0
laravel-admin 是一个快速开发管理后台的框架,这里不做详细介绍
UEditor.php
?1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <?php namespace App\Extensions; use Encore\Admin\Form\Field; class UEditor extends Field { protected static $css = [ ]; public static $isJs =false; protected static $js = [ '/laravel-u-editor/ueditor.config.js' , '/laravel-u-editor/ueditor.all.min.js' , '/laravel-u-editor/lang/zh-cn/zh-cn.js' , ]; protected $view = 'Admin.Tool.UEditor' ; public function render() { $this ->script = <<<EOT UE.delEditor( '{$this->id}' ); var ue = UE.getEditor( '{$this->id}' ); EOT; return parent::render(); } } |
UEditor.blade.php
?1 2 3 4 5 6 7 8 | <div class = "form-group {!! !$errors->has($errorKey) ?: 'has-error' !!}" > <label for = "{{$id}}" class = "col-sm-2 control-label" >{{ $label }}</label> <div class = "col-sm-8" > @ include ( 'admin::form.error' ) <textarea class = "{{ $class }}" id= "{{$name}}" name= "{{$name}}" placeholder= "{{ $placeholder }}" {!! $attributes !!} >{{ old( $column , $value ) }}</textarea> @ include ( 'admin::form.help-block' ) </div> </div> |
以上这篇关于laravel-admin ueditor 集成并解决刷新的问题就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持服务器之家。
原文链接:https://blog.csdn.net/jiaHey/article/details/78194273
声明
1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。