Setting up local environment for koenig-lexical frontend

I want to make changes to kg-lexical-html-renderer inside GitHub - TryGhost/Koenig: Components of Ghost’s Editor but even after following the linking (yarn link), it doesn’t seem to work.

Steps that I did:

  • Linked using yarn link
  • Head out to main ghost repo → ghost/core and ran this command (yarn link @tryghost/kg-lexical-html-renderer)

Did the same for kg-default-nodes as there is a dependency between both.

  • Ran the server from the root of the project on both the repos, can’t see the code changes on the frontend. Can’t find any documentation around the same.

Goal: To be able to make changes on kg-default-nodes or kg-lexical-html-renderer and see the changes live on the frontend (ghost main repo)

Need help.

cc: @Kevin

  1. have you built kg-default-nodes?
  2. how are you testing that the renderer is working? Posts in Ghost are not rendered dynamically, you’ll need to make a change to a post’s content and save it for the re-render to occur
  3. what changes are you trying to make? I would suggest opening an issue first and explaining what you want to change and why, render output is something we generally don’t change much due to backwards compatibility and changes need to be handled with care

@Kevin Thanks for the reply, sorry couldn’t get back early.

I wanted to solve this issue: Code block's caption tags are escaped · Issue #17100 · TryGhost/Ghost · GitHub
Seems like that is already fixed.

How was I trying to check if the rendered is working? Commented the code block exportdom logic to check if anything still pops up. Turns out I had to save the post again for the logic to take effect. Got it working locally, thanks for the help.