Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public ngAfterViewChecked() {
// console.log('ok');
if (!this.initialised) {
// console.warn('not initialised');
Prism.highlightAll(false, () => {
this.initialised = true;
});
}
}
}
useEffect(() => {
Prism.highlightAll();
}, []);
const title = parse(post.title.rendered);
ReactDOM.render(component, this.div, () => {
prism.highlightAll();
});
}
componentDidUpdate(prevProps) {
highlightAll();
}
public componentDidMount() {
highlightAll();
}
renderDOM() {
for (const [id, component] of this.components) {
const div = document.getElementById(id);
if (div instanceof HTMLElement) {
ReactDOM.render(component, div);
}
}
prism.highlightAll();
}
componentDidMount() {
const subtitle = this.props.meta.getIn(['currentQuestion', 'subtitle']);
setHtmlMetadata(subtitle);
Prism.highlightAll();
}
componentWillReceiveProps(nextProps) {
componentDidMount() {
Prismjs.highlightAll();
}
useEffect(() => {
Prism.highlightAll();
}, []);