<commit_before><?php
/**
 * Tinymce v4.0.21
 * Homepage: http://www.tinymce.com/
 * Examples: http://www.tinymce.com/tryit/basic.php
 * Options: http://www.tinymce.com/wiki.php/Configuration
 * 
 * Let Yii2 Tinymce v4.0.21 (Yii Framework 2.0 extention)
 * @copyright Copyright (c) 2014 Let.,ltd
 * @author <NAME> <<EMAIL>>, <NAME> <<EMAIL>>
 */

namespace letyii\tinymce;
use yii\helpers\Html;
use yii\helpers\Json;
use letyii\tinymce\TinymceAssets;

class Tinymce extends \yii\widgets\InputWidget
{
    public $id = '';
    public $content = '';
    public $configs = [];

    /**
	 * Initializes the widget.
	 */
	public function init() {
		TinymceAssets::register($this->view);
	}

	/**
	 * Renders the widget.
	 */
	public function run() {
        $this->options['id'] = empty($this->id) ? 'tinymce' . rand(0, 1000) : $this->id;
        $this->configs['selector'] = 'textarea#' . $this->options['id'];
		$this->getView()->registerJs('tinymce.init('. Json::encode($this->configs) .');');
        echo Html::activeTextarea($this->model, $this->attribute, $this->options);
	}
}<commit_msg>Fixed ID Textarea<commit_after><?php
/**
 * Tinymce v4.0.21
 * Homepage: http://www.tinymce.com/
 * Examples: http://www.tinymce.com/tryit/basic.php
 * Options: http://www.tinymce.com/wiki.php/Configuration
 * 
 * Let Yii2 Tinymce v4.0.21 (Yii Framework 2.0 extention)
 * @copyright Copyright (c) 2014 Let.,ltd
 * @author <NAME> <<EMAIL>@let.vn>, <NAME> <<EMAIL>>
 */

namespace letyii\tinymce;
use yii\helpers\Html;
use yii\helpers\Json;
use letyii\tinymce\TinymceAssets;

class Tinymce extends \yii\widgets\InputWidget
{
    public $id = '';
    public $content = '';
    public $configs = [];

    /**
	 * Initializes the widget.
	 */
	public function init() {
		TinymceAssets::register($this->view);
	}

	/**
	 * Renders the widget.
	 */
	public function run() {
        $this->options['id'] = Html::getInputId($this->model, $this->attribute);
        $this->configs['selector'] = 'textarea#' . $this->options['id'];
		$this->getView()->registerJs('tinymce.init('. Json::encode($this->configs) .');');
        echo Html::activeTextarea($this->model, $this->attribute, $this->options);
	}
}
{'fraction_non_alphanumeric': 0.1983508932661475, 'fraction_numerical': 0.01603298213467705, 'mean_word_length': 3.617336152219873, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3333986', 'n_tokens_mistral': 848, 'n_tokens_neox': 789, 'n_words': 145}