Learn how to build a live writer plug-in

Source: Internet
Author: User

Follow the instructions in http://www.cnblogs.com/liulun/archive/2009/05/27/1491116.html. I didn't expect the interface to be so convenient, and the plug-in is so easy to do.

Specifically,

1. Create a project for Class Library (C #)

2. Follow his instructions.

1) An entity class, static, contentprocessor. It is the string that is pasted in the text box and decorated with HTML code CSS.

2) A form that is used to paste code into it. Press OK to return the string in the text box.

3) a class that inherits the writer interface. Some information, such as the name displayed by the plug-in. Other information, such as whether the URL indicates the sent object is unknown.

This class control opens the form. After the confirmation is pressed, the content is obtained through the static class. If the content is not empty, the returned dialogresult. OK and else no.

Effect:

Test

 

Obviously, this effect does not support functions such as code re-arrangement, which is obviously unsatisfactory, but it is enough for learning plug-ins.

In addition, a blog recommends an official plug-in: paste from Visual Studio. After you copy the code from Visual Studio, press the corresponding button in the right column to insert it to the cursor in the Visual Studio style. Color and indent.

However, I still like the style that can be folded and copied. It is said that JavaScript is used.

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.