Home  >  Q&A  >  body text

objective-c - iOS开发使用什么对html进行代码高亮

请问一下,现在有获取一个json的html文件,但是html只有文章主题,其他样式都没有,有什么办法可以对其样式进行渲染吗

仅有的幸福仅有的幸福2727 days ago509

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-05-02 09:26:00

    Are you using webview to display HTML? If so, then it should be the same as web code highlighting.
    That is, you need to parse the html and then embed a code highlighting js into it, such as highlight.js, etc.

    reply
    0
  • 滿天的星座

    滿天的星座2017-05-02 09:26:00

    Google has a streamlined and efficient code highlighting solution, it seems to be called pretty code, it is a js library, you can check it out

    reply
    0
  • Cancelreply