1 | <?php |
||
8 | class ToastUiEditor extends Field |
||
9 | { |
||
10 | const EDIT_TYPE_MARKDOWN = 'markdown'; |
||
11 | const EDIT_TYPE_WYSIWYG = 'wysiwyg'; |
||
12 | |||
13 | const PREVIEW_STYLE_VERTICAL = 'vertical'; |
||
14 | const PREVIEW_STYLE_TAB = 'tab'; |
||
15 | |||
16 | /** |
||
17 | * The field's component. |
||
18 | * |
||
19 | * @var string |
||
20 | */ |
||
21 | public $component = 'nova-toast-ui-editor-field'; |
||
22 | |||
23 | /** |
||
24 | * Indicates if the element should be shown on the index view. |
||
25 | * |
||
26 | * @var bool |
||
27 | */ |
||
28 | public $showOnIndex = false; |
||
29 | |||
30 | protected $initialEditType; |
||
31 | |||
32 | protected $options; |
||
33 | |||
34 | protected $height; |
||
35 | |||
36 | protected $previewStyle; |
||
37 | |||
38 | protected $allowIframe; |
||
39 | |||
40 | protected $useCloudinary; |
||
41 | |||
42 | public function __construct($name, $attribute = null, callable $resolveCallback = null) |
||
53 | |||
54 | public function initialEditTypeMarkdown() |
||
60 | |||
61 | public function initialEditTypeWYSIWYG() |
||
67 | |||
68 | public function minHeight(string $minHeight) |
||
74 | |||
75 | public function language(string $language) |
||
81 | |||
82 | public function useCommandShortcut(bool $useCommandShortcut = true) |
||
88 | |||
89 | public function hideModeSwitch(bool $hideModeSwitch = true) |
||
95 | |||
96 | public function toolbarItems(array $toolbarItems) |
||
102 | |||
103 | public function height(string $height) |
||
109 | |||
110 | public function previewStyleVertical() |
||
116 | |||
117 | public function previewStyleTab() |
||
123 | |||
124 | public function allowIframe(bool $allowIframe = true) |
||
130 | |||
131 | public function useCloudinary(bool $useCloudinary = true) |
||
137 | |||
138 | /** |
||
139 | * Return Cloudinary field meta. |
||
140 | * |
||
141 | * @return array |
||
142 | */ |
||
143 | protected function cloudinaryMeta() |
||
156 | |||
157 | /** |
||
158 | * Compute Cloudinary signature from environment. |
||
159 | * |
||
160 | * @return array |
||
161 | */ |
||
162 | protected function cloudinarySignature() |
||
177 | |||
178 | public function jsonSerialize() |
||
192 | } |
||
193 |