freeCodeCamp / publish

> Content backend platform for /news
https://publish.freecodecamp.org
BSD 3-Clause "New" or "Revised" License
10 stars 9 forks source link

feat: add ids on heading #423

Closed Sembauke closed 4 months ago

Sembauke commented 5 months ago

Preview in the editor and IDs in the console:

image

Demonstration:

https://github.com/freeCodeCamp/publish/assets/46919888/9a4e9fee-87f0-4c6b-8900-771f9140c51c

closes #400

Sembauke commented 5 months ago

Solve: change id when the content of the heading changes. Currently the id updates once and then no more.

Solution: probably add a custom node view and trigger a re-render with the updateAttributes function that is present on the prop object.

Nirajn2311 commented 5 months ago

Ahh good to know I was not the only one who faced this issue. Yea the solution you've proposed sounds like a good idea.