Is there a hook or event that's fired once markdown content has rendered?
See original GitHub issueIs 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:
- Created 3 years ago
- Reactions:2
- Comments:5
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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!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?