• HOME
    • PRODUCT
    • PRICING
    • ABOUT
    • COMMUNITY
    Menu
    • HOME
    • PRODUCT
    • PRICING
    • ABOUT
    • COMMUNITY
    Get in touch
    Get in touch
    Menu
    • HOME
    • PRODUCT
    • PRICING
    • ABOUT
    • COMMUNITY
    • Sign in
    • Start free trial
    • Get in touch
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags
    • Users
    • Groups
    • Documentation
      • Home
      • Read API
      • Write API
      • Plugin Development
    1. Home
    2. Tags
    3. highlight
    Log in to post
    • All categories
    • drew

      Using highlight.js for code blocks as posts load
      Plugin Development • highlight redactor • • drew

      3
      0
      Votes
      3
      Posts
      1663
      Views

      drew

      @baris thanks. I realised there's some issues with redactor munging the data.
      When code is insered inside a <pre/> block, switching between HTML and WYSIWYG views will munge the content to HTML entitites.
      You can recreate this issue on this page:
      http://imperavi.com/redactor/examples/typography/

      Switch to code view and add some HTML inside the <pre/> block. I entered:
      <p>test</p>
      Switch to WYSIWYG and back to code and it has been replaced by:

      &lt;p&gt;test&lt;/p&gt;

      This breaks the ability to parse that code later with syntax highlighters.

      I've raised it with Imperavi.

    • SuperMike

      How to add a new code style into editor?
      NodeBB Development • markdown editor highlight • • SuperMike

      3
      0
      Votes
      3
      Posts
      1920
      Views

      SuperMike

      @julian Greate! I will push my code plugin in to highlight.js

    • nik

      Recent post highlighting
      Feature Requests • highlight recent posts • • nik

      7
      0
      Votes
      7
      Posts
      2364
      Views

      A

      @nik This was the board I tested it on. 😆 I'm not sure if @julian can shed some light on this as something isn't right with your experience and I'm not sure what would cause these things to happen. It's not your build of NodeBB, it's not one browser or the other as it happens on both Desktop & Mobile, the only thing left is your internet connection, but I don't know whether xhr-polling or websocket issues would cause it.

    Get Started

    • Product
    • Pricing

    Resources

    • Demo Site
    • Answers
    • Docs
    • Bug Bounty

    Company

    • About
    • Blog
    • Contact
    Start Free Trial
    Github Facebook Instagram Twitter
    © 2014 – 2022 NodeBB, Inc. — Made in Canada.
    • Terms
    • Privacy
    • GDPR
    • DMCA
    • Contact
    Menu
    • Terms
    • Privacy
    • GDPR
    • DMCA
    • Contact