rich-text.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /**
  3. * @class FLRichTextModule
  4. */
  5. class FLRichTextModule extends FLBuilderModule {
  6. /**
  7. * @method __construct
  8. */
  9. public function __construct() {
  10. parent::__construct(array(
  11. 'name' => __( 'Text Editor', 'fl-builder' ),
  12. 'description' => __( 'A WYSIWYG text editor.', 'fl-builder' ),
  13. 'category' => __( 'Basic', 'fl-builder' ),
  14. 'partial_refresh' => true,
  15. 'icon' => 'text.svg',
  16. ));
  17. }
  18. }
  19. /**
  20. * Register the module and its form settings.
  21. */
  22. FLBuilder::register_module('FLRichTextModule', array(
  23. 'general' => array( // Tab
  24. 'title' => __( 'General', 'fl-builder' ), // Tab title
  25. 'sections' => array( // Tab Sections
  26. 'general' => array( // Section
  27. 'title' => '', // Section Title
  28. 'fields' => array( // Section Fields
  29. 'text' => array(
  30. 'type' => 'editor',
  31. 'label' => '',
  32. 'rows' => 13,
  33. 'wpautop' => false,
  34. 'preview' => array(
  35. 'type' => 'text',
  36. 'selector' => '.fl-rich-text',
  37. ),
  38. 'connections' => array( 'string' ),
  39. ),
  40. ),
  41. ),
  42. ),
  43. ),
  44. ));