Skip to content

Type – WP Editor

Henner R Setyono edited this page Feb 29, 2020 · 5 revisions

'copyright_text' => [
  'label' => __( 'Copyright text' ),
  'type' => 'wp-editor',
  'disableRevertButton' => true,
  'quicktags' => false,
  'mediaButtons' => false,
  'tinymce' => [
    'toolbar1' => 'bold,italic,link,undo,redo',
    'toolbar2' => '',
  ],
],

ARGUMENTS

  • disableRevertButton - Disabling the "revert to default" button. You can have this arg in any option, but it makes the most sense in wp-editor.
  • quickTags - Tab between Visual and Text. If you want to add this, remove this arg. Setting it to true will still disable it.
  • mediaButtons - Add Image button. If you want to enable this, remove this arg. Settil it to true will still disable it.

AVAILABLE TOOLBAR

  • formatselect (The dropdown where you can choose Heading 1 - 6)
  • wp_adv (Toggle the 2nd Toolbar - You must add this in 1st Toolbar if planning to use 2nd Toolbar)
  • bold
  • italic
  • link
  • bullist (Bullet List)
  • numlist (Numbered List)
  • undo
  • redo
  • alignleft
  • aligncenter
  • alignright
  • strikethrough
  • hr
  • forecolor (Add text color - not recommended since the UI is poor)
  • pastetext (Paste as Text - remove formatting when copying from Word)
  • removeformat
  • charmap (Show a popup to insert Symbol)

Value Format

'copyright_text' => __( 'Copyright © [current-year] - [site-title]' )

Clone this wiki locally