Laravel Vuejs 实战: 开发知乎 (8) 美化编辑器
1. 使用 UEditor 增量包:
https://github.com/JellyBool/simple-ueditor s
执行下载:
1 Git clone https://github.com/JellyBool/simple-ueditor.git
2. 用此项目的 ueditor 目录替换原来的 public/vendor/ueditor 目录;
可以先删除原来的目录, 移动 simple-ueditor 文件夹下 ueditor 整个文件夹的到 public/vendor / 目录里面, 然后删除 simple-ueditor 目录即可;
3. 实例化编辑器的时候配置 toolbar , 主要是 toolbar 的配置varue=UE.getEditor('editor',{
toolbars:[
['bold','italic','underline','strikethrough','blockquote','insertunorderedlist','insertorderedlist','justifyleft','justifycenter','justifyright','link','insertimage','fullscreen']
],
elementPathEnabled:false,
enableContextMenu:false,
autoClearEmptyNode:true,
wordCount:false,
imagePopup:false,
autotypeset:{indent:true,imageBlockLine:'center'}
});
就是将 create.blade.PHP 文件做如下修改:@extends('layouts.app')
@section('content')
@include('vendor.ueditor.assets')
发布问题