Windows Live writer highlight plug-in
I have tried many highlighted plug-ins on the Internet for Windows Live writer. I don't know if it is my software version (14.0.8089.726 ZH-CN, many of these plug-ins will report errors and immediately have no desire to use them. This article will introduce two different Windows Live writer highlight plug-ins, insert code for Windows Live writer and syntax highlighter, to compare their coloring effect and some other functions.
Note: Example of coloringCode-- Javascript
1. insert code for Windows Live writer
Let's take a look at the insert code:
Color Code effect:
VaR Arrayimageerror = []; Function Imageonerror (OBJ, type, URL ){ If (Obj. SRC. indexof ('Blog .163.com' ) =-1) {arrayimageerror. Push (obj. SRC. Replace ( 'Http: // images.163.com/099851203 /' , '' ); Obj. src = obj. SRC. Replace ( 'Images .163.com' , 'Blog .163.com' );}} Function Writeimageerror (){ If (Arrayimageerror. length> 0) {createlogfile ();}} Function Createlogfile (){ VaR Form = Document. createelement ( "Form" ); Form. ID = "Form_imageerror" ; Form. Name ="Form_imageerror" ; Form. Action = & Quot;/templates/163/imageerrorlog. Do & quot" ; Form. method = "Post" ; Form.tar get = "Ifr_imageerror" VaR Input = Document. createelement ( "Input" ); Input. ID = "Txt_imageerror" ; Input. Name = "Txt_imageerror" ; Input. type = "Text" ; For ( VaR I = 0; I <arrayimageerror. length; I ++ ){ If (Input. value ="" ) {Input. Value + = arrayimageerror [I];} Else {Input. Value + = "|" + Arrayimageerror [I] ;}} // Alert (input. value ); Form. appendchild (input); document. getelementbyid ( "Div_imageerror" ). Appendchild (form); form. Submit ();}
: Insert code for Windows Live writer
2. Syntax highlighter
Syntax highlighter:
Color Code effect:
VaR Arrayimageerror = []; Function Imageonerror (OBJ, type, URL ){ If (Obj. SRC. indexof ('blog .163.com ') =-1) {arrayimageerror. Push (obj. SRC. Replace ('HTTP: // Images.163.com/099851203 /','')); OBJ. src = obj. SRC. Replace ('images .163.com ', 'blog .163.com ');}} Function Writeimageerror (){ If (Arrayimageerror. Length > 0) {createlogfile ();}} Function Createlogfile (){ VaR Form = Document . Createelement (" Form "); Form. ID =" Form_imageerror "; Form. Name =" Form_imageerror "; Form. Action =" /Templates/163/imageerrorlog. Do "; Form. method =" Post "Pipeline form.tar get =" Ifr_imageerror " VaR Input = Document . Createelement (" Input "); Input. ID =" Txt_imageerror "; Input.Name =" Txt_imageerror "; Input. type =" Text "; For ( VaR I = 0; I <arrayimageerror. Length ; I ++ ){ If (Input. value =" ") {Input. Value + = arrayimageerror [I];} Else {Input. Value + =" | "+ Arrayimageerror [I];} // Alert (input. value ); Form. appendchild (input );Document . Getelementbyid (" Div_imageerror "). Appendchild (form); form. Submit ();}
: Syntax highlighter
Summary:
1. it can be clearly seen that the indention of the insert code is smaller than that of syntax highlighter, which is consistent with our usual indention. 2. The insert Code supports single quotation mark string coloring, while the syntax highlighter does not; 3. The insert code function supports line number insertion and line separation color replacement. 4. Syntax highlighter supports custom template configuration, but it is basically quite common and can be ignored; 5. These two plug-ins do not support custom color configuration and fail to compare. 6. The coloring principle of the highlighted plug-in is to use CSS styles to control the block color. Therefore, any highlighted plug-in can be Source code "View for custom editing, but the difficulty is different;
Finally, I personally prefer to use insert code. After inserting the code, there is basically no need to adjust it. You can download and try out favorite kids shoes.