Menggunakan tombol Tab untuk memberi indentasi pada kode di dalam blok kode (Gutenberg)

Menggunakan tombol Tab untuk memberi indentasi pada kode di dalam blok kode (Gutenberg)

by

in

Hello, my name is Ben and I have been using WordPress for about 4 years.
I need help regarding the Gutenberg Editor. It has a <code> block for forum posts but it is quite hard to use, because it does not support indent formating, because pressing tab does not work. I have seen forum posts regarding this topic, which are about 5 years old, so I assume, that there is no actual solution to this issue yet. I would love to use TAB-indent in code blocks.

Is there a way I can fix this on my own in the mean time? Inserting a JS-Script, installing a plugin, pressing something like CTRL+Shift to indent instead.

Yes I am aware, that you can preformat the code in another program and paste it. I also have a plugin called „Syntax-highlighting Code“, which helps with the formating in terms of coloring. The library Prism.js helps with that as well.

But code with no indent is not getting any indent after the plugin or js library either.

I would love to hear some suggestions and if WordPress / Gutenberg Editor Developers will add a feature for this eventually!

Thank you so much!
Ben

source


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Discover more from Wordpress supported for Telkom University

Subscribe now to keep reading and get access to the full archive.

Continue reading