As the title, the attributes adding by using addFilter() not saved on blocks which is manually added by third party plugins, its still be saved on core blocks. I have attached my sample plugin to use for testing and producing the issue.
The extra attributes should be saved on custom blocks also, as it is on core blocks.
I tested test-extra-blocks.zip with WordPress 4.9.7 and Gutenberg 3.3.0 and found that I was unable to add the spacer block from that plugin without seeing an error so I cannot get to step 3. (30s)
@JoomUnited since it has been about 3 months since this issue was opened, and there has been a lot of development happening in that time, would it be possible to get an updated example plugin for testing?
Hi @designsimply ,
Sorry for late response.
I have updated the code for test block (check my attachment).
Hope you can find the solutions for this.
Thanks in advance.
@designsimply @JoomUnited can you please tell me how can we save value of the text field for third party blocks, as in "blocks.registerBlockType" filter we can set custom attributes to core blocks only
Updating wordpress beta 5.0 with latest gutenberg plugin version solves the issue
@JoomUnited apologies for the extended delay in reply. I tried installing https://github.com/WordPress/gutenberg/files/2231058/test-extra-blocks.zip by activating the plugin on WordPress 5.0.3 with no other active plugins and it results in the editor showing a blank screen and the following console error: "TypeError: can't convert undefined to object" for extra.js.
Because Gutenberg has now been merged into WordPress and because you are asking for help creating custom code, may I ask that you refresh the example code again if you are still working on it? I will subscribe to this issue and watch for a reply more closely.
Aside: I also noticed there is a new issue at https://github.com/WordPress/gutenberg/issues/13413 which discusses filters I'm adding the link in case it's helpful for you.
@designsimply WP update fixed the issue.
I close the issue.
Hooray! 馃帀
And thank you for the follow-up @JoomUnited. It is appreciated. 馃檪