First, update content
- Added Lua and Matlab syntax highlighting in Cnblog tab (syntaxhighlight not added in tab)
- Add folding area plug-in, see effect display;
- Add bat execution file, directly copy plug-in required DLL files to the specified location;
- Add or subtract olwplugins.css style files and olwplugins.js script files;
- Test WIN10/7 32/64-bit system installation usage;
- Optimize some use experience;
Ii. Description of the update
- @ I'm going to change my name to Doodle and captain J.K. Two, try out the extended development of Wilco.syntaxhighlighter to achieve two syntax highlighting for Lua and Matlab. Because bloggers are not good at these two languages, the test is not necessarily in place, if two or other people use the process of any problems can be feedback, Bo Master again try to modify the perfect, first here thanked.
- Collapsed area plug-in, previously developed in the article Insert collapsed area feature, but that was for WLW, this time porting to OLW, and optimizing some of the use experience.
- At the same time, foldregion plug-ins belong to their own for easy browsing development, so need to add custom CSS style and JS script file. To use the plug-in, you need to add a reference to these two files in the "blog Park admin", "Settings", "page Top HTML", the file download reference the last resource download, reference Code reference is as follows:
<link type= "Text/css" rel= "stylesheet" href= "Http://files.cnblogs.com/files/memento/OLWPlugins.css"/>< Script type= "Text/javascript" src= "Http://files.cnblogs.com/files/memento/OLWPlugins.js" ></script>
- On an article many people say do not know where to put the plug-in, Plugins folder did not find such problems, in order to facilitate the use of the blogger in the compressed package add a bat file,Deploydll.bat, after decompression directly executed to copy the plug-in required DLL to the specified position.
- Bo master through Hyper-V respectively simulated WIN10/7 32/64-bit different environments for plug-in testing, can be used, if there is a problem, please leave a message to discuss. Note that the Open Live Writer software itself is recommended based on the. NET 4.5.2 Environment, detailed reference OpenLiveWriter.SDK.nuspec .
- By the way, the dll,windows system, which is downloaded from the Internet, is sometimes locked by default and needs to be unlocked in the properties before being used.
Third, the effect shows
- Cnblog (insert code recommended by Analog Blog Park)
(Figure A) Blog Park Web page Insert Code tool Pop-up window
(figure II) plug-in simulation pop-up window
1 // <summary>2 /// constructor3 // </summary>4 /// <param name= "Settings" > Plug-in configuration </param>5 /// <param name= "Content" > Text content </param>6 PublicCnblogs (Settings Settings,stringContent7{8InitializeComponent ();9 Ten Try One{ AM_settings = Settings; -M_content = Content; -M_htmlparser =NewHtmlparser (); the -Chbcollapse.checkedchanged + = chbcollapse_checkedchanged; -Chbtab.checkedchanged + = chbtab_checkedchanged; -Chbshowlinenum.checkedchanged + = chbshowlinenum_checkedchanged; + -Load + = Cnblogs_load; +Txttab.keypress + = commonhelper.numberimput_keypress; A} at Catch(Exception ex) -{ -Commonhelper.showerror (ex); -} -}
Cnblog
// <summary>/// constructor// </summary>/// <param name= "Settings" > Plug-in configuration </param>/// <param name= "Content" > Text content </param> PublicCnblogs (Settings Settings,stringContent) {InitializeComponent ();Try{m_settings = Settings; M_content = Content; M_htmlparser =NewHtmlparser (); Chbcollapse.checkedchanged + = chbcollapse_checkedchanged; Chbtab.checkedchanged + = chbtab_checkedchanged; Chbshowlinenum.checkedchanged + = chbshowlinenum_checkedchanged; Load + = Cnblogs_load; Txttab.keypress + = commonhelper.numberimput_keypress; }Catch(Exception ex) {Commonhelper.showerror (ex); }}
1 --File name is Module.lua2 --Define a module named Modules3 Module= {}4 5 --Define a constant6 Module. Constant = "This is a constant"7 8 --Define a function9 function Module. FUNC1 ()TenIo.write ("This is a public function! \ n") One End A - Local functionFunc2 () - Print("This is a private function! ") the End - - function Module. FUNC3 () -Func2 () + End - + return Module
Lua
1 x = [0:0.01:10]; 2sin(x); 3plot(x, y), Xlabel (' x '), Ylabel ('sin(x) '), title ('sin(x) Graph '), 4 grid on, axis equal
Matlab
- Syntaxhighlighter (using the Syntaxhighlighter highlighting script that has been implanted in the blog Park)
(figure III) Syntaxhighlighter main interface
(figure IV) Syntaxhighlighter plugin detail settings
///<summary>///Constructor///</summary>///<param name= "Settings" > Plug-in configuration </param>///<param name = "Content" > Text content </param>public cnblogs (Settings Settings, string content) {InitializeComponent (); try{m_ Settings = Settings;m_content = Content;m_htmlparser = new Htmlparser (); Chbcollapse.checkedchanged + = chbcollapse_checkedchanged; Chbtab.checkedchanged + = chbtab_checkedchanged; Chbshowlinenum.checkedchanged + = chbshowlinenum_checkedchanged; Load + = Cnblogs_load; Txttab.keypress + = commonhelper.numberimput_keypress; }catch (Exception ex) {commonhelper.showerror (ex);}}
<summary>///constructor///</summary>///<param name= "Settings" > Plug-in configuration </param>///<param name= "Content" > Text content </param>public cnblogs (Settings Settings, string content) {InitializeComponent (); try{m_ Settings = Settings;m_content = Content;m_htmlparser = new Htmlparser (); Chbcollapse.checkedchanged + = chbcollapse_checkedchanged; Chbtab.checkedchanged + = chbtab_checkedchanged; Chbshowlinenum.checkedchanged + = chbshowlinenum_checkedchanged; Load + = Cnblogs_load; Txttab.keypress + = commonhelper.numberimput_keypress; } catch (Exception ex) {commonhelper.showerror (ex);}}
- Foldregion (collapse area plugin to optimize browsing experience)
(Figure V) Foldregion main interface
titleExpand
1 |
a |
2 |
b |
3 |
c |
4 |
d |
tr>
5 |
e |
6 |
f |
7 |
g |
8 |
h |
9 |
i |
10 |
j |
11 |
K |
back to topShrinkage
Iv. Download of resources
- Plugin Download: memento.olw_v1.0.0.0.7z
- Project Source: OLW Plugin Coding
- Other resources:
- Open Live Writer Official website
- Open Live Writer Github
- Syntaxhighlighter Download: http://alexgorbatchev.com/SyntaxHighlighter/download/
- Syntaxhighlighter Configuration: http://alexgorbatchev.com/SyntaxHighlighter/manual/configuration/
[Tool] Open Live Writer Plugin Update