| Server IP : 69.39.225.240 / Your IP : 216.73.216.138 Web Server : Apache System : Linux bronze7.serverhost.net 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64 User : reademotions ( 1074) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/reademotions/www/wp-content/plugins/bb-plugin/modules/rich-text/ |
Upload File : |
<?php
/**
* @class FLRichTextModule
*/
class FLRichTextModule extends FLBuilderModule {
/**
* @method __construct
*/
public function __construct() {
parent::__construct(array(
'name' => __( 'Text Editor', 'fl-builder' ),
'description' => __( 'A WYSIWYG text editor.', 'fl-builder' ),
'category' => __( 'Basic', 'fl-builder' ),
'partial_refresh' => true,
'icon' => 'text.svg',
));
}
}
/**
* 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',
),
'connections' => array( 'string' ),
),
),
),
),
),
'style' => array( // Tab
'title' => __( 'Style', 'fl-builder' ), // Tab title
'sections' => array( // Tab Sections
'style' => array( // Section
'title' => '', // Section Title
'fields' => array( // Section Fields
'color' => array(
'type' => 'color',
'connections' => array( 'color' ),
'label' => __( 'Color', 'fl-builder' ),
'show_reset' => true,
'show_alpha' => true,
'preview' => array(
'type' => 'css',
'selector' => '{node} .fl-rich-text, {node} .fl-rich-text *',
'property' => 'color',
'important' => true,
),
),
'typography' => array(
'type' => 'typography',
'label' => __( 'Typography', 'fl-builder' ),
'responsive' => true,
'preview' => array(
'type' => 'css',
'selector' => '.fl-rich-text, .fl-rich-text *:not(b, strong)',
),
),
),
),
),
),
));