Giter Club home page Giter Club logo

laravel-ckeditor's Introduction

Laravel-CKEditor-Bundle

A Laravel 3.x bundle for integrating CKEditor in your applications.

CKEditor Bundle, by Vilhjalmur Magnusson

CKEditor Bundle allows you to generate CKEditor rich text boxes for your Laravel applications.

######1. Install using Artisan CLI:

php artisan bundle:install ckeditor

######2. Add the following line to application/bundles.php file:

return array('ckeditor' => array('auto' => true),);

######3. Add the following to the application.php config file in the 'aliases' array:

'CKEditor'                 => 'CKEditor\\CKEditor',

######4. Publish the bundle assets to your public folder:

php artisan bundle:publish

######5. Add the following to your view file to include the CKEditor Javascript:

Asset::container('ckeditor')->scripts();

######To create a super simple rich text box:

$ckeditor = new CKEditor();
$ckeditor->editor('editorName');

######To create a more advanced rich text box:

$ckeditor = new CKEditor();
$config = array();
$config['toolbar'] = array(
    array( 'Source', '-', 'Bold', 'Italic', 'Underline', 'Strike' ),
    array( 'Image', 'Link', 'Unlink', 'Anchor' )
);
$events['instanceReady'] = 'function (ev) {
    alert("Loaded: " + ev.editor.name);
}';
$ckeditor->editor("field1", "

Initial value.

", $config, $events);

If anyone wants to call an instance of the ckeditor statically then whom ever who has the knowledge and time and willing to do so can submit a pull-request when he/she has modified the ckeditor php class for those things. I however am not bothered by doing '$myeditor = new CKEditor();', and at the moment I am simply just not good enough a php programmer to accomplish the task. So any help and pull-requests are welcome.

laravel-ckeditor's People

Contributors

villimagg avatar

Watchers

 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.