<div class="row"> <div class="col-sm-12"> <?php $hb = new HTMLIndent(); $html_snippet = SmartUtil::clean_html_string($hb->indent($result), false); $options = array("editbutton" => false, "colorbutton" => false, "collapsed" => true); $contents = array("body" => '<pre class="prettyprint linenums">' . $html_snippet . '</pre>', "header" => array("icon" => 'fa-code', "title" => '<h2>HTML Output (Run Time: ' . $run_time . ')</h2>')); $ui->create_widget($options, $contents)->color('pink')->print_html(); //setting with callback and chaining (Like jQuery) $widget->body("content", "This is a new value using jQuery style setup.")->header("toolbar", '')->header("title", "<h2>Toolbar removed!!!</h2>")->color('darken', function ($w) { $html_result = $w->print_html(true); $hb = new HTMLIndent(); $html_snippet = SmartUtil::clean_html_string($hb->indent($html_result), false); $w->body("content", $w->body("content") . '<br /><br /><pre class="prettyprint linenums">' . $html_snippet . '</pre>')->print_html(); }); //plog($widget->body); ?> </div> </div> <!-- end row --> <!-- row --> <div class="row">
// print JS content $js = $dt->print_js(true); $run_time = $ui->run_time(false); echo $html; ?> </article> <article class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> <?php $options = array("editbutton" => false, "colorbutton" => false, "collapsed" => true); // print html output $hb = new HTMLIndent(); $html_snippet = SmartUtil::clean_html_string($hb->indent($html), false); $contents = array("body" => '<pre class="prettyprint linenums">' . $html_snippet . '</pre>', "header" => array("icon" => 'fa fa-code', "title" => '<h2>HTML Output (Run Time: ' . $run_time . ')</h2>')); $ui->create_widget($options, $contents)->color('pink')->print_html(); // print js $js_snippet = SmartUtil::clean_html_string($js); $js_contents = array("body" => '<pre class="prettyprint linenums">' . $js_snippet . '</pre>', "header" => array("icon" => 'fa fa-code', "title" => '<h2>JS Output</h2>')); $ui->create_widget($options, $js_contents)->color('green')->print_html(); ?> </article> </div> <div class="row"> <div class="col-sm-12"> <div class="well"> <?php $md = file_get_contents("docs/smartui/datatable.md"); $parsedown = new Parsedown(); $doc = $parsedown->parse($md); echo str_replace('<pre', '<pre class="prettyprint linenums"', $doc); ?>