K
Kala
New Member
Hello,
I'm trying to create my first custom elementor widget.
What I cannot wrap my head around is how elementor is getting attributes for what it's displaying.
for example in the "Text editor widget" we have the following code responsible for the rendering.
protected function render()
{
$editor_content = $this->get_settings_for_display( 'editor' );
$editor_content = $this->parse_text_editor( $editor_content );
$this->add_render_attribute( 'editor', 'class', [ 'elementor-text-editor', 'elementor-clearfix' ] );
$this->add_inline_editing_attributes( 'editor', 'advanced' );
?>
<div <?php echo $this->get_render_attribute_string( 'editor' ); ?>><?php echo $editor_content; ?></div>
<?php
}
But there are multiple controlls, controlling how this element element should looki like. for example there is the "alighn" control. It's not references here but the text is still aligned correctly. Why? thabk you!
Kala
I'm trying to create my first custom elementor widget.
What I cannot wrap my head around is how elementor is getting attributes for what it's displaying.
for example in the "Text editor widget" we have the following code responsible for the rendering.
protected function render()
{
$editor_content = $this->get_settings_for_display( 'editor' );
$editor_content = $this->parse_text_editor( $editor_content );
$this->add_render_attribute( 'editor', 'class', [ 'elementor-text-editor', 'elementor-clearfix' ] );
$this->add_inline_editing_attributes( 'editor', 'advanced' );
?>
<div <?php echo $this->get_render_attribute_string( 'editor' ); ?>><?php echo $editor_content; ?></div>
<?php
}
But there are multiple controlls, controlling how this element element should looki like. for example there is the "alighn" control. It's not references here but the text is still aligned correctly. Why? thabk you!
Kala