DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations

Trending

  • Creating Scalable OpenAI GPT Applications in Java
  • Unlocking the Power of AIOps: Enhancing DevOps With Intelligent Automation for Optimized IT Operations
  • Is TestOps the Future of Software Testing?
  • Postgres JSON Functions With Hibernate 5

How to Use Syntax Highlighter With Open Live Writer

Microsoft has open sourced Windows Live Writer as "Open Live Writer" and it is now part of the .NET Foundation. It was a great move, but as a part of modernizing the Windows Live Writer they have started removing some functionalities (like plugins—which are planned to come later) and adding others. If you're like me, you may have used the PreCode syntax highlighter plugin... luckily, you don't have to stop. Let me show you how it's done.

Jalpesh Vadgama user avatar by
Jalpesh Vadgama
·
Mar. 31, 16 · Tutorial
Like (3)
Save
Tweet
Share
2.97K Views

Join the DZone community and get the full member experience.

Join For Free

Microsoft has open sourced Windows Live Writer as "Open Live Writer" and it is now part of the .NET Foundation. It was a great move, but as a part of modernizing the Windows Live Writer they have started removing some functionalities and adding other new ones. Eventually, they are going to add plugins but right now there is no support for that. I have been using Windows Live Writer for more than 5 years now and was using syntax highlighter for highlighting code on this blog. If you are not familiar with syntax highlighter, you can find more information about it in the following link.

http://alexgorbatchev.com/SyntaxHighlighter/

It is a fully functional, self-contained code syntax highlighter developed in JavaScript. Since Open Writer does not support plugins for the time being, I have to find another solution to write blog posts and do some syntax highlighting. So, I have found a way to do this and would like to share it with you. In this blog post, we are going to learn how we can use syntax highlighter another way.

I was using the PreCode syntax highlighter plugin. It’s an open source plugin and provides a great syntax highlighter.

http://precode.codeplex.com/

But as Open Live Writer does not support plugins, there is no way to directly integrate that plugin. Fortunately, precode syntax highlighter plugin comes with a desktop application, so you can run it by finding it on windows 10 like below.

precode-syntax-highlighter

Once you run the preCode Code manager desktop app, It will run the application like following.

preCode-code-manager-syntaxhighlighter

Here, you can write your code and choose your settings on the right side like below.

precode-code-manager-syntaxhighlighter-with-code

Then, just click on "Copy to Clipboard and Close". It will copy the syntax highlighter code in the memory.  Now, click on source tab at the bottom of the open live writer window like below.

source-code-plugin

Then paste the code like below.

sourc-code-source

And now, publish your post and it will look like below.

function helloWorld{     
  alert("hello world"); 
}

That's it. It is very easy to use PreCode code manager with Open Live Writer. Hope this was helpful. Stay tuned for more!

Syntax (programming languages) article writing

Published at DZone with permission of Jalpesh Vadgama, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Trending

  • Creating Scalable OpenAI GPT Applications in Java
  • Unlocking the Power of AIOps: Enhancing DevOps With Intelligent Automation for Optimized IT Operations
  • Is TestOps the Future of Software Testing?
  • Postgres JSON Functions With Hibernate 5

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com

Let's be friends: