vs2013 html 复制,Copy As HTML

Copy As HTML

This is a lightweight tool that allows you to copy code from the Code Window and convert it into HTML while preserving syntax highlighting, indentation, background colour andfont face (new in v2.0).

Sample:

Code Snippet

using System;

using System.Windows.Forms;

using System.Drawing;

namespace WindowsFormsApplication1

{

///

///Class summary.

///

publicpartial classForm1 : Form

{

///

///Constructor summary.

///

public Form1()

{

InitializeComponent();

}

}

}

To copy code in HTML format:In the Code Window, highlight the code that you want to copy.

Right-click on the selected code.

Click on "Copy As HTML..." on the context menu.

Select the options you want in the settings dialogue.

Optionally click "Save As Defaults" so that the Add-in remembers them.

Click on OK.

The code will then be copied to the Clipboard in two formats: HTML format and text format. These two formats cater for the two views you typically get in a blog editor: WYSIWYG view and HTML code view. Note: You can also access the Add-in from the Menubar –> Edit –> Copy As HTML...

Options:Max Height

Title Block

Alternating Lines

Line Numbers

Wrap Lines

Un-indent

Background Colour

Copy As HTML SourceHTML Encode. Converts the HTML source code to encoded HTML.

Syntax Highlighting. Applies full syntax highlighting to the HTML-encoded HTML source code.

Use Class NamesContainer

Title Block

Your custom colours are left intact because it converts the RTF, outputted by Visual Studio, into HTML.

Line numbering is produced by making use of HTML ordered list; this produces far more efficient HTML code than span tags cluttering up your webpage. This approach requires co-operation from the accompanying style sheet. The example below assumes the default class name is being used:

.le-cah-containerli

{

list-style-image: none;

list-style-position: outside;

list-style-type: decimal;

}

Also, empty span tags are removed; something that many RTF to HTML converters leave behind in the conversion process.

Change History:VersionDateDescription

2.19 Apr 2015Re-enabled the option to choose the background colour because it now uses an improved algorithm to obtain the background colour set in Visual Studio.

Updated localisations.

2.011 Mar 2015Updated installer for VS2013.

Added functionality to preserve font family. Defaults to Consolas.

Improved option Copy As HTML Source with Syntax Highlighting.

Changed indentation character to  .

Disabled the option to choose the background colour because it now uses the background colour set in Visual Studio.

1.924 May 2013Updated installer for VS2012.

1.8—Not released.

1.79 Aug 2011Added start line number.

Improved Unicode conversion.

1.613 May 2011Updated MSI for VS2010.

1.519 Dec 2009Added support for negative Unicode characters in the RTF.

1.426 Oct 2009Added the control to more context menus to support the following file types: .asax (VB), .asax (C#), .ashx, .asmx, .css, .js, .wsf, .xaml

1.312 Oct 2009Outputs quotation marks as named HTML character entities to prevent some blog editors from converting straight quotes to smart quotes.

Copy As HTML Source: Uses HTML Encode instead of replacing angle brackets.

1.224 Sep 2009Corrected line number margin for code snippets with less than ten lines of code.

1.123 Sep 2009Added control to context menus for ASPX, ASP and HTML windows.

Added option: Copy As HTML Source.

Added option: Use Class Names.

Changed to ems for line number margin to allow for variable font sizes.

1.016 Sep 2009Original.

See Also:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值