English 中文(简体)
DOM中的Gutenberg-editor区
原标题:Show wordpress Gutenberg-editor blocks in DOM
问题回答

The HTML comments in question are the blocks save markup which is created from the static block content when a post/page is saved from the Editor.

The easiest way to see the actual markup saved (if you want to copy/paste block code) is to create a new post/page in the Editor and add the blocks you need, then change the Editor mode to Code Editor (Ctrl+Shift+Alt+M). Note: this method works best for static blocks - dynamic blocks usually just store attributes or sometimes nothing as they are dynamically rendered.

为了更好地了解在前端如何提供区块的过程,通过以下功能读取:do_blocks()>,以及它如何使用epse_parblocks(>和

鉴于你在沙尔的节目编排,我建议使用REST的预报格式Block打字/a>,以获取方案上有效的构件所需的所有组成部分,例如:

GET /wp/v2/block-types/<namespace>
$ curl https://example.com/wp-json/wp/v2/block-types/<namespace>

附加论点和实例见





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签