Replies: 3 comments
-
Hi,
As far as I know, I don't know such a way, but if you could explain in a bit more detail what you want to do, we might be able to offer some suggestions. |
Beta Was this translation helpful? Give feedback.
-
Here’s the situation:
When the user adjusts the font size, I store it in The problem: Gutenberg.Save.Attribute.mp4 |
Beta Was this translation helpful? Give feedback.
-
Does this mean that you are running setAttributes every time the device type has changed? Perhaps you want to extend the core typography support somehow, but it seems like it would be easier to develop your own control. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I’m working with a core block, and I need to update one of its attributes when the user hits the “Save” button, but before the post content is actually saved.
I tried using the
isSavingPost()
function from the data store, but it seems that block attributes are updated after the save is completed, which is too late for what I’m trying to do.Is there a reliable way to hook into the save process and call setAttributes({ ... }) just before the post is committed?
Any guidance or example would be greatly appreciated!
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions