Syntax_Highlighter::editor_buttons( string $name, object $field )

Description #

Add insert code button before editor.

Parameters #

  • $name
    string (Required) Field name.
  • $field
    object (Required) Field object.

Changelog #


Source #

File: addons/syntaxhighlighter/syntaxhighlighter.php

	public function editor_buttons( $name, $field ) {
		$field->add_html( '<button type="button" class="ap-btn-insertcode ap-btn-small ap-btn mb-10 ap-mr-5" apinsertcode><i class="apicon-code ap-mr-3"></i>' . __( 'Insert Code', 'anspress-question-answer' ) . '</button>' );

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment