asayhome/asay-editor 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

asayhome/asay-editor

最新稳定版本:v0.0.1

Composer 安装命令:

composer require asayhome/asay-editor

包简介

adding configured text editor to laravel application

README 文档

README

Adding configured text editor to laravel application.

Arabic English

Requirements

This package require that livewire\livewire package it's already installed in your project.

Usage

composer require asayhome/asay-editor
  • this package include styles and scripts need to be pushed in your blade, by default the package use after-scripts tag for scripts stack and after-scripts for styles stack, you must added in your project layout like next:

@stack('after-styles') @stack('after-scripts')

or you can change this tags names by Publishing the package config file and change the value of:

pushed-styles-container pushed-scripts-container

inside blade file:

 <livewire:asay-editor 
    id="textEditor" 
    language="ar" 
    :placeholder="__('Type your text her')"
    content="Editor content her" 
    height="200px" 
    />

when typing in inside the editor will auto fire event textChange that contain the typed content, you can change this event as you need by adding firedEvent='EventName' in the including editor tags as next:

 <livewire:asay-editor 
    id="textEditor" 
    language="ar" 
    :placeholder="__('Type your text her')"
    content="Editor content her" 
    height="200px" 
    firedEvent="textChange"
    />

This event is livewire event you can get fired content inside blade file as follow:

<script>
        Livewire.on('textChange',(content)=>{
            console.log(content);
        })
</script>

Or you can get it inside livewire component by adding the event in inside component listeners array as follow:

 protected $listeners = ['textChange'];

 public function textChange($content)
    {
        ...
    }

Publishing config

php artisan vendor:publish --tag=asayeditor-config

Publishing lang

php artisan vendor:publish --tag=asayeditor-lang

Publishing views

php artisan vendor:publish --tag=asayeditor-views

Publishing assets

php artisan vendor:publish --tag=asayeditor-assets

统计信息

  • 总下载量: 6
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: Blade

其他信息

  • 授权协议: Unknown
  • 更新时间: 2022-07-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固