New language code highlighting and Windows Live writer plugin development

Source: Internet
Author: User

Recently made some study notes in the blog park. One is the official Swift book from Apple, and the other is learning scheme with the school classroom (SICP).

Neither of these languages is widely spoken (or swift newness). The original Windows Live Writer code highlighting plugin in the blog Park does not apply to these languages.

So I had to find my own way. First I found the highlight.js this JS highlight plugin. Search to its official website. Follow the steps to deploy in the blog park.

It should be noted that the blog park I have not yet found how to add an outside chain.

The CSS and JS downloaded from Highlightjs have no place to upload. So I directly choose violence to paste its content into the blog Park header (

After testing, Swift can be highlighted. But here it is still a little imperfect. Highlightjs asked us to put the code in <pre><code></code></pre>.

Every time you write a blog, it's a lot of trouble to add it to the HTML code Editor. So I thought that I should use the plugin function of Windows Live Writer, type a piece of code to automatically add this tag.

Specific plug-in development online are available. The link I referred to cannot be found. However, it is easy to put the DLL in the C # class library under the Live Writer plugin folder.

The API directly refers to Windows Live Writer.dll (a file similar to the one in the writer folder). Since then I can use my own plugin to highlight the code.

This method is very versatile. Because Highlightjs also supports many languages, more than the blog Park plugin. You can customize according to your own situation. :)

New language code highlighting and Windows Live writer plugin development

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.