HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/kms.komma.pro/wwwroot/lib/form/types/field_type_editor.class.php
<?php
/**
 * field_type_text.class.php
 * Created by Komma Mediadesign.
 * Author: mike
 * Date: 13/12/13
 */

class Field_Type_Editor extends Form_Field
{
    public function __construct()
    {
        parent::__construct();
    }

    /*
     * Create output
     * @return string
     */
    public function generate()
    {
        // HTML output
        $output = '';
        $output .= '<div class="input_holder editor_holder">
                        <label for="' . $this->name . '">' . $this->label . '</label>
                        <div class="simple_editor">
                            <textarea id="' . $this->name . '" class="s_editor"></textarea>
                        </div>
                        <span class="placeholder">' . $this->placeholder . '</span>
                    </div>';

        // Javascript
        $_SESSION['js_output'] .= '
        <script type="text/javascript" >
            $(\'#' . $this->name . '\').trumbowyg(
            {
                btns: [\'bold\', \'italic\', \'underline\',
                    \'|\', \'link\',
                    \'|\', \'btnGrp-lists\'],
                fullscreenable: false,
                semantic: true
            });
        </script>
        <script type="text/javascript" src="/public/js/editor.js"></script>';



        return $output;
    }
}