简体   繁体   中英

Create new user tool to paste text with EditPlus

I use EditPlus 3.30 as my code editor, but this question also applies to earlier versions. I would like to create a new user tool item on the user tool bar. The default set-up allows you to open a template when you click on an icon. I would like to create an item that instead pastes code from a libray file (*.ctl) or any other text file. In the end, the new user tool item would function just like one of the icons on the hml tool bar.

I don't have extensive programming experience.

EditPlus text editor: How to create a toolbar user tool icon to paste custom code snippets.

Configure the Preference/Tools dialog like this:

Command        CScript.exe C:\Your Path\Pastetext.js
Argument         //NoLogo $(CurRow)
leave initial directory blank
Action         Run as text (Insert)

Save the flowing five lines as Pastetext.js

var cArgs =                  WScript.Arguments;
var rStr =                  cArgs(0);
var rStr ="<item id='file1' media-type='application/xhtml+xml' href='aSample.html'/>";
// Print filler string
WScript.StdOut.Write(rStr);

//The rStr variable will print where your cursor is in an open document.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM