How to use the prismjs.highlightAll function in prismjs

To help you get started, we’ve selected a few prismjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DSI-HUG / dejajs-components / src / component / code-viewer / code-viewer.component.ts View on Github external
public ngAfterViewChecked() {
        // console.log('ok');
        if (!this.initialised) {
            // console.warn('not initialised');
            Prism.highlightAll(false, () => {
                this.initialised = true;
            });
        }
    }
}
github buzzycloud / buzzyblog / src / components / posts / PostFullText.jsx View on Github external
useEffect(() => {
        Prism.highlightAll();
    }, []);
    const title = parse(post.title.rendered);
github shawn2016 / isui / docs / libs / markdown / index.js View on Github external
ReactDOM.render(component, this.div, () => {
          prism.highlightAll();
        });
      }
github shaotianyu / blog-front / pages / detail / markdown.js View on Github external
componentDidUpdate(prevProps) {
        highlightAll();
    }
github NSFI / ppfish-components / libs / markdown / index.js View on Github external
renderDOM() {
    for (const [id, component] of this.components) {
      const div = document.getElementById(id);

      if (div instanceof HTMLElement) {
        ReactDOM.render(component, div);
      }
    }
    prism.highlightAll();
  }
github bonham000 / app-time-lessons / src / components / PracticeQuiz.js View on Github external
componentDidMount() {
		const subtitle = this.props.meta.getIn(['currentQuestion', 'subtitle']);
		setHtmlMetadata(subtitle);
		Prism.highlightAll();
	}
	componentWillReceiveProps(nextProps) {