Skip to content

Instantly share code, notes, and snippets.

@teknosains
Created July 25, 2017 09:45
Show Gist options
  • Save teknosains/6d47f97b5f826d16d007d8b9976a2a2f to your computer and use it in GitHub Desktop.
Save teknosains/6d47f97b5f826d16d007d8b9976a2a2f to your computer and use it in GitHub Desktop.
Call JS injection
<?php
class My_class extends MY_Controller
{
/*
* Show Create Post interface.
* Include any library you want
*/
public function create_post()
{
$data = [
'js_lib' => ['/assets/tinymce/tinymce.min.js'], //include tinymce JS library
'js' => ['post/create_post_js'], //include own-custom JS
'mdl_js_layout' => false
];
$this->materialAdminLayout($data, 'backend/post/create_post');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment