faustjs icon indicating copy to clipboard operation
faustjs copied to clipboard

[feat] Add anchor attribute to core/paragraph block

Open jan-clockworkwp opened this issue 1 year ago • 3 comments

Currently core/paragraph block implementation in "@faustwp/blocks": "^4.1.0" does not consider anchor attribute values. In some scenarios it can be handy to be able to set anchor to paragraph elements as well. WP core with version 6.6.1 alows for setting Anchor value to the Core Paragraph blocks.

jan-clockworkwp avatar Sep 18 '24 08:09 jan-clockworkwp

Hey @jan-clockworkwp, thanks for creating this issue.

Here is an example showing how to override a query of a component from @faustwp/blocks within your own codebase: https://github.com/wpengine/faustjs/issues/1932#issuecomment-2293711402

You should be able to add support for the fields that are missing until it's available in a future release of the blocks package.

josephfusco avatar Sep 18 '24 15:09 josephfusco

Hi @josephfusco, thanks for your suggestion. I did a similar Faust core block override on my end; I just thought that it should be a part of the Faustjs package, as it is a WordPress core-supported Gutenberg feature. Until it is part of the package, I have done exactly the same thing with the addition of actually updating the component-generated markup, as in the core/paragraph block from the Faust package, the id attribute on the p tag is not being considered, even if the anchor is part of the attributes. Thanks again; I appreciate your input and suggestion for a temporary solution.

jan-clockworkwp avatar Sep 19 '24 07:09 jan-clockworkwp

Hey @jan-clockworkwp. Thank you. Would you be able to submit a. PR for this change?

theodesp avatar Dec 12 '24 14:12 theodesp