question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is there a hook or event that's fired once markdown content has rendered?

See original GitHub issue

Is there a way to tell when content has successfully rendered after using <nuxt-content>?

I need to apply accessibility fixes to the content – i.e., fill in a blank button, etc. etc. – but I can’t figure out how to (a) wait until the markdown has completely and then (b) grab the rendered elements from the DOM to © apply the fixes.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

1reaction
cschwedacommented, Apr 22, 2021

I ended up doing as you suggest – checking for the rendered content in the mounted hook. However, I did the check within a this.$nextTick. This seems to do the trick!

0reactions
NozomuIkutacommented, Apr 21, 2021

NuxtContent component is defined as a functional component, which by design doesn’t have any lifecycle hook. All it does is to receive props and to return virtual DOM nodes.

Why don’t you use the parent’s mounted hook? Did you try and have any problem?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Outputting Markdown from Jekyll using hooks
There were two events for :document that immediately seemed relevant to my goal: :pre_render - fires before the document content is rendered; : ......
Read more >
Understanding Vue.js Lifecycle Hooks - DigitalOcean
The beforeUpdate hook runs after data changes on your component and the update cycle begins, right before the DOM is patched and re-rendered....
Read more >
React Hook to Run Code After Render - Dave Ceddia
The After-Render Hook: useEffect​​ This will run the effect after every render – the same as componentDidUpdate in class components.
Read more >
remarkjs/react-markdown - GitHub
This package is a React component that can be given a string of markdown that it'll safely render to React elements. You can...
Read more >
Getting Started With The React Hooks API - Smashing Magazine
By default, effects are executed mainly after the render has been completed, but you have the option to also fire them when certain...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found