Text Control
The text control displays a text input field. You can set the following parameters:
spellcheck: true/false. (Default: false)trigger: ‘keyup’/‘enter’. (Default: keyup)inlineEditing: Set to true to enable
class Prefix_Element_Text extends \Bricks\Element { // Set builder controls public function set_controls() { $this->controls['exampleText'] = [ 'tab' => 'content', 'label' => esc_html__( 'Text', 'bricks' ), 'type' => 'text', 'spellcheck' => true, // Default: false // 'trigger' => 'enter', // Default: 'enter' 'inlineEditing' => true, 'default' => 'Here goes your text ..', ]; }
// Render element HTML public function render() { if ( isset( $this->settings['exampleText'] ) ) { echo $this->settings['exampleText']; } else { esc_html_e( 'No text provided.', 'bricks' ); } }}Resources
Section titled “Resources”Was this helpful?
A quick vote and short notes help us improve these docs faster.
Leave a note for us
Please do not include passwords, license keys, or personal data. We store submitted notes to improve the docs.
Thanks for sharing feedback. We're using it to improve these docs.