GithubHelp home page GithubHelp logo

bxi / laravel-ckeditor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jeroennoten/laravel-ckeditor

0.0 2.0 0.0 1.56 MB

Easy CKEditor integration with Laravel 5

License: MIT License

PHP 6.37% JavaScript 3.18% CSS 26.93% HTML 63.52%

laravel-ckeditor's Introduction

Custom CKEditor integration with Laravel 5

This package provides an easy way to set up CKEditor with Laravel 5. I think CKEditor is the best free WYSIWYG editors available. This package makes it super easy to use the editor with Laravel 5. It provides a custom blade directive @ckeditor('textareaId') to quickly integrate it in your forms.

Installation

  1. Require the package using composer:

    composer require webbatools/laravel-ckeditor
    
  2. Add the service provider to the providers in config/app.php:

    webbatools\LaravelCkEditor\ServiceProvider::class,
  3. Publish the public assets:

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

Updating

  1. To update this package, first update the composer package:

    composer update webbatools/laravel-ckeditor
    
  2. Then, publish the public assets with the --force flag to overwrite existing files

    php artisan vendor:publish --tag=ckeditor-assets --force
    

Usage

The package provides a custom blade directive @ckeditor('textareaId') that transforms a <textarea> into a CkEditor instance. Give your <textarea> an id attribute and add the blade directive at the bottom of your page, with the identifier of the <textarea>.

Example:

<textarea id="bodyField"></textarea>

@ckeditor('bodyField')

Configuration

If you need to configure the CkEditor instance, you can do that by passing a second argument with all options into the blade directive. Refer to the CkEditor config documentation to discover all possible options.

Example:

<textarea id="bodyField"></textarea>

@ckeditor('bodyField', ['height' => 500])

laravel-ckeditor's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.