wporg-developer icon indicating copy to clipboard operation
wporg-developer copied to clipboard

Enable custom line number in the Code Syntax Block

Open ryelle opened this issue 2 years ago • 0 comments

This is tracking issue for https://github.com/mkaz/code-syntax-block/issues/81.

Currently we can set this property on the HTML itself, but this isn't possible if using the block in the editor.

Example of code with the custom start data-start.

<!-- wp:code {"lineNumbers":true} -->
<pre class="wp-block-code" data-start="10">
<code lang="php" class="language-php line-numbers">…</code>
</pre>
<!-- /wp:code -->

ryelle avatar Jun 01 '22 15:06 ryelle