rich-text.php
1.1 KB
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
<?php
/**
* @class FLRichTextModule
*/
class FLRichTextModule extends FLBuilderModule {
/**
* @method __construct
*/
public function __construct()
{
parent::__construct(array(
'name' => __('编辑器', 'fl-builder'),
'description' => __('A WYSIWYG text editor.', 'fl-builder'),
'category' => __('基本模块', 'fl-builder'),
'partial_refresh' => true
));
}
}
/**
* Register the module and its form settings.
*/
FLBuilder::register_module('FLRichTextModule', array(
'general' => array( // Tab
'title' => __('General', 'fl-builder'), // Tab title
'sections' => array( // Tab Sections
'general' => array( // Section
'title' => '', // Section Title
'fields' => array( // Section Fields
'text' => array(
'type' => 'editor',
'label' => '',
'rows' => 13,
'wpautop' => false,
'preview' => array(
'type' => 'text',
'selector' => '.fl-rich-text'
)
)
)
)
)
)
));