Created
May 2, 2015 15:40
-
-
Save dakshhmehta/96e2a108455ee7ff0e69 to your computer and use it in GitHub Desktop.
CKEditor Macro for Laravel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Form::macro('editor', function($name, $value){ | |
// Requires "dakshhmehta/helpers" in composer.json for Template | |
Template::addJS(asset('assets/js/ckeditor/ckeditor.js')); | |
Template::addJS(asset('assets/js/ckeditor/adapters/jquery.js')); | |
$html = '<textarea class="form-control ckeditor" name="'.$name.'" id="'.$name.'">'.$value.'</textarea>'; | |
return $html; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment