front / gutenberg-js

JavaScript only version of the WordPress Gutenberg editor (DEPRECATED)
GNU General Public License v2.0
390 stars 42 forks source link

Editor does not seem to render in Angular #8

Closed arnvanhoutte closed 5 years ago

arnvanhoutte commented 5 years ago

I tried implementing Gutenberg-JS in Angular 6+. The project can be found here: https://github.com/arnvanhoutte/ng-gutenberg

When running the project, the editor does not show up. There aren't any errors in the console either, except a few console.logs from the apiFetch() function

SofiaSousa commented 5 years ago

Hi @arnvanhoutte, thanks for giving a chance to Gutenberg-js!

I've checked your repo and in polyfills.ts file, you set the wp.apiFetch global var but you are not handling with the requests from the editor. The editor expects different responses according the requests. (You can check our docs or The WordPress REST API Handbook)

I think that's the problem. Let me know if it helped.

arnvanhoutte commented 5 years ago

Ah indeed. I updated my apiFetch with the example you made for g-editor and this one works flawlessly. Thank you