定制 aiman/thaana-tinymce-field 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

aiman/thaana-tinymce-field

最新稳定版本:v1.3.0

Composer 安装命令:

composer require aiman/thaana-tinymce-field

包简介

A Laravel Nova Tinymce Field for Thaana

README 文档

README

This Nova Package allow you to use TinyMce Rich Editor with varios Customization which supports thaana.

image

image

Installation

composer require aiman/thaana-tinymce-field

Configuration

You can publish configuration file for default configuration values. You can enter the driver required for tinymce in here.

php artisan vendor:publish --provider="Aiman\ThaanaTinymceField\FieldServiceProvider"

This is the contents of the published config file:

 <?php
return [

    /*
    |--------------------------------------------------------------------------
    | Default Options
    |--------------------------------------------------------------------------
    |
    | Here you can define the options that are passed to all ThaanaTinymceField
    | fields by default. Override these values from options method when using fields.
    |
    */

     'default_options' => [
        'height' => 500,
        'menubar'=> "",
        'directionality'=> "ltr",
        'image_caption'=> true,
        'plugins' => [
            'advlist autolink lists link image charmap print preview anchor',
            'searchreplace visualblocks code fullscreen',
            'insertdatetime media table paste code help wordcount',
        ],
        'toolbar' => 'undo redo | formatselect | bold italic backcolor | alignleft aligncenter alignright alignjustify | ullist numlist outdent indent | removeformat | help | image',
    ],
    'api_key' => 'YOUR API KEY HERE',
    'driver' => env('FILESYSTEM_DRIVER', 'public')
];
?>

Usage

In your Nova resource add the use declaration and use the ThaanaTinymceField field:

use Aiman\ThaanaTinymceField\ThaanaTinymceField;

    /**
     * Get the fields displayed by the resource.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function fields(Request $request)
    {
        return [
            ID::make()->sortable(),

            ThaanaTinymceField::make('Content', 'content'),
        ];
    }

Options

You can pass values to options method which will override thaana-tinymce-field.php's option array defualt values

ThaanaTinymceField::make('Content', 'content')->options(['key' => 'value'])

Thaana

You can turn thaana translation. by default it is true.

ThaanaTinymceField::make('Content', 'content')->thaana()

Classes

You can turn thaana translation. by default it is true.

ThaanaTinymceField::make('Content', 'content')->thaana()

folder

TinyMCE supports embedding images into the editor. This function requires the folder name in which the images will be stored. By default all images will be stored in the root of the storage

ThaanaTinymceField::make('Content', 'content')->folder('tinymce')

Storage Path

This is the Storage path of the file stored. By default images will be fetched from the origin domain. However, if your using a cloud storage then enter the cloud storage path

ThaanaTinymceField::make('Content', 'content')->storagePath('https://theeru.sgp1.digitaloceanspaces.com/')

Important

After Image uploaded to tinymce is stored automatically. However it is still being tested

This package is tested for Nova v2.0+ Latest tested on nova v3.6.0

Credit

Huge Credit goes for @Jawish Hameed for his thaana translation plugin Thaana Keyboard

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-03-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固