theme development - Proper, exhaustive documentation for wp.editor etc

There exist the following :wp.editor.PanelColorSettingswp.editor.InspectorControlswp.editor.RichTextwp.editor.BlockCo

There exist the following :

  • wp.editor.PanelColorSettings
  • wp.editor.InspectorControls
  • wp.editor.RichText
  • wp.editor.BlockControls
  • etc.

Where is the documentation that shows the full list of available 'components' in wp.editor?

Also, where is the equivelent documentation for wp.element and wpponents?

Yours, frustratedly

There exist the following :

  • wp.editor.PanelColorSettings
  • wp.editor.InspectorControls
  • wp.editor.RichText
  • wp.editor.BlockControls
  • etc.

Where is the documentation that shows the full list of available 'components' in wp.editor?

Also, where is the equivelent documentation for wp.element and wpponents?

Yours, frustratedly

Share Improve this question asked Feb 27, 2019 at 15:41 RichardRichard 1835 bronze badges 2
  • 3 I’m afraid we’re all as frustrated as you are, because there’s a lot of documentation missing for Block Editor... – Krzysiek Dróżdż Commented Feb 27, 2019 at 16:54
  • Yeah I'm getting that impression. We just need a big list of objects in wp.editor I've managed to get a few of them working, but I'm currently stuck on RangeControl, which seems to exist, but where I don't know, and how to use it is anyone's guess. – Richard Commented Feb 27, 2019 at 17:03
Add a comment  | 

2 Answers 2

Reset to default 3

I have gone through the implementation of all Gutenberg core blocks in start, so now if I have to know how to use something then I first find the closest core component which is implementing that and then looks at the documentation of that particular block via https://github/WordPress/gutenberg/tree/master/packages/block-library/src

This process is solving problems for me up until now.

You can find documentation for the various packages in the Gutenberg Github repo in the readme for each package.

For example, the "data" module docs are here: https://github/WordPress/gutenberg/tree/master/packages/data

I will search a term in the Gutenberg repo, and show just the Markdown files to quickly find any related documentation.

As far as seeing what objects or functions are available for any given package, I use the browser console to explore things. Open an admin page with the Block editor, open your console, and type "wp."

It will show you a list of all the apis. as you select each object, you can then type another "." to see the methods or properties it contains. This is really helpful in understanding how things work and what methods are available.

I'm often looking around in wp.data.select( 'core/block-editor' ) for methods to use when building my blocks. So I type wp.data.select( 'core/block-editor' ). in the console, and it shows a list of everything that's available. If I need to know more about a method, I'll then search the gutenberg repo for it to find more details.

Hope that helps!

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745307962a4621830.html

相关推荐

  • theme development - Proper, exhaustive documentation for wp.editor etc

    There exist the following :wp.editor.PanelColorSettingswp.editor.InspectorControlswp.editor.RichTextwp.editor.BlockCo

    12小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信