#6765

dreftymac
Participant

You can still do what you want if you make sure that standard.jsee encloses its code in a javascript function or a javascript class definition.

For example:

function say_hello(name){
return “hello world from ” + name + ” ! ” ;
}
// filename = say_hello.jsee

#include “say_hello.jsee”

var name = ’emeditor’;
alert(say_hello(name));

name = ’emacs??’;
alert(say_hello(name));

name = ‘vim??’;
alert(say_hello(name));

The #include feature of EmEditor is powerful enough to allow you to ‘insert’ code wherever you want as long as the code you are ‘inserting’ is correctly enclosed in a function or class, then you use the function or class to invoke the code you want to run at the exact place where you want to run it.