forked from marciocamello/yii2-x-editable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
XEditableWysiHtml5.php
75 lines (64 loc) · 1.42 KB
/
XEditableWysiHtml5.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
/**
* XeditableText class file.
*
* @author Marcio Camello <[email protected]>
* @link http://
* @copyright Copyright © Marcio Camello 2014
* @version 1.5.1
*/
namespace mcms\xeditable;
class XEditableWysiHtml5 extends XEditable
{
public $type = 'textarea';
/**
* @see XEditable
* @var boolean
* If true - html will be escaped in content of element via $.text() method.
* If false - html will not be escaped, $.html() used.
* When you use own display function, this option obviosly has no effect.
*/
public $escape = true;
/**
* @see XEditable
* @var string
* CSS class automatically applied to input
*/
public $inputclass = null;
/**
* @see XEditable
* @var string
* Placeholder attribute of input. Shown when input is empty.
*/
public $placeholder = null;
/**
* @see XEditable
* @var object
* Wysihtml5 default options.
* See https://github.com/jhollingworth/bootstrap-wysihtml5#options
*/
public $wysihtml5 = '{stylesheets: false}';
/**
* @see XEditable
* @var string
* HTML template of input. Normally you should not change it.
*/
public $tpl = '<textarea></textarea>';
/**
* @see Xeditable
* @see Init extension default
*/
public function init()
{
parent::init();
$this->registerAssets();
}
/**
* @see Xeditable
* @see Init extension default
*/
public function registerAssets()
{
WysiHtml5Asset::register($this->view);
}
}