You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using WordPressBlocksViewer and WordPressBlocksProvider so I can choose to customize some of their core blocks if I want to change how it is displayed or add custom blocks.
Because I am using TypeScript, the documentation on changing a core block doesn't work because their examples are not meant for TypeScript. It breaks my application. I eventually found ONE small example that only shows how to create the block but not implement it.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I used WPEngine's faust-scaffold-ts repo's code for my website. This was based on Faust's "Implementing TypeScript" documentation.
I am using WordPressBlocksViewer and WordPressBlocksProvider so I can choose to customize some of their core blocks if I want to change how it is displayed or add custom blocks.
Because I am using TypeScript, the documentation on changing a core block doesn't work because their examples are not meant for TypeScript. It breaks my application. I eventually found ONE small example that only shows how to create the block but not implement it.
My code:
/wp-blocks/CoreParagraph.tsx
/wp-blocks/index.ts
_app.tsx WordPressBlocksProvider implementation
Page query with the fragment hardcoded
Error I get from the above
Page query with the fragment included via import
Error I get from the above
Is anyone able to tell me what I am doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions