diff --git a/src/code-block/edit.js b/src/code-block/edit.js index b4b1872..a107b61 100644 --- a/src/code-block/edit.js +++ b/src/code-block/edit.js @@ -8,8 +8,12 @@ export default function editSyntaxHighlighterBlock( { attributes, setAttributes, content, } = attributes; + const { settings: { tabSize } } = window.syntaxHighlighterData; + const editView =
setAttributes( { content: nextContent } ) } placeholder={ __( 'Tip: you can choose a code language from the block settings.', 'syntaxhighlighter' ) } diff --git a/syntaxhighlighter.php b/syntaxhighlighter.php index 43b69a0..caad503 100644 --- a/syntaxhighlighter.php +++ b/syntaxhighlighter.php @@ -373,6 +373,7 @@ function enqueue_block_editor_assets() { 'supported' => ( '3' == $this->settings['shversion'] ), 'default' => (bool) $this->settings['quickcode'], ), + 'tabSize' => (int) $this->settings['tabsize'], ); wp_add_inline_script(