轻量级 web 富文本编辑器

    1. <?php
    2. WangEditor::make()
    3. ->menus([])
    4. ->zIndex(999)
    5. ->uploadImgShowBase64(true)
    6. ->uploadImgServer("")
    7. ->uploadFileName("file")
    8. ->uploadImgHeaders(['xx'=>'xx'])
    9. ->style("height:600px;")//设置高度
    10. ->component(Html::make()->html("123456789"));//添加工具栏与编辑区域中间的自定义组件

    自定义组件有两个props

    • attrs:当前组件属性对象
    • editor:当前编辑器对象,可以使用this.editor调用各种方法