PluginProbe
Elementor Website Builder – more than just a page builder / 4.2.0-dev2
Elementor Website Builder – more than just a page builder v4.2.0-dev2
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
elementor / includes / controls / wysiwyg.php

wysiwyg.php in Elementor Website Builder – more than just a page builder 4.2.0-dev2, at includes/controls/wysiwyg.php

81 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Elementor;
3
4 use Elementor\Modules\DynamicTags\Module as TagsModule;
5
6 if ( ! defined( 'ABSPATH' ) ) {
7 exit; // Exit if accessed directly.
8 }
9
10 /**
11 * Elementor WYSIWYG control.
12 *
13 * A base control for creating WYSIWYG control. Displays a WordPress WYSIWYG
14 * (TinyMCE) editor.
15 *
16 * @since 1.0.0
17 */
18 class Control_Wysiwyg extends Base_Data_Control {
19
20 /**
21 * Get wysiwyg control type.
22 *
23 * Retrieve the control type, in this case `wysiwyg`.
24 *
25 * @since 1.0.0
26 * @access public
27 *
28 * @return string Control type.
29 */
30 public function get_type() {
31 return 'wysiwyg';
32 }
33
34 /**
35 * Render wysiwyg control output in the editor.
36 *
37 * Used to generate the control HTML in the editor using Underscore JS
38 * template. The variables for the class are available using `data` JS
39 * object.
40 *
41 * @since 1.0.0
42 * @access public
43 */
44 public function content_template() {
45 ?>
46 <div class="elementor-control-field">
47 <div class="elementor-control-title">{{{ data.label }}}</div>
48 <div class="elementor-control-input-wrapper elementor-control-tag-area"></div>
49 </div>
50 <# if ( data.description ) { #>
51 <div class="elementor-control-field-description">{{{ data.description }}}</div>
52 <# } #>
53 <?php
54 }
55
56 /**
57 * Retrieve textarea control default settings.
58 *
59 * Get the default settings of the textarea control. Used to return the
60 * default settings while initializing the textarea control.
61 *
62 * @since 2.0.0
63 * @access protected
64 *
65 * @return array Control default settings.
66 */
67 protected function get_default_settings() {
68 return [
69 'label_block' => true,
70 'ai' => [
71 'active' => true,
72 'type' => 'textarea',
73 ],
74 'dynamic' => [
75 'active' => true,
76 'categories' => [ TagsModule::TEXT_CATEGORY ],
77 ],
78 ];
79 }
80 }
81