Hello Digital Man,
Not sure I understand what you mean here. By "run it from JS" you mean
nano?
The editor. The console.editfile() method uses whatever editor the user has selected as their preferred editor to edit the filename passed.
Even when nano itself is not configured in External Editors? I don't see how the JS could know that the user is actually selecting nano as their editor. See below..
I suppose I should explain what is going on. I asked Nightfox if he
could rip out the function in SlyEdit that reformats MSGTMP with
quoted initials, so I could offer up nano as a message editor as well
(and possibly even vim in the future), since they can be used in
"restricted" mode where nothing on the disk can be altered except the
file loaded, ie: MSGTMP.
So after all of that is done, and a new formatted MSGTMP is created,
the JS runs nano, where you can edit and save, and then the JS posts
the message and exits back to the BBS.
So if there's a better way than the first option above you gave, by
all means explain it to me in laman's terms and I'll give that a shot
as well.
It sounds like you want to use SlyEdit as a quoter, but not an editor?
Something like that. Basically only the function of SlyEdit that retreives the name in the TO field for initials, and quote/reformat/rewrap function of SlyEdit is being used here, so "SlyEdit" as a whole is not being used, correct.
There's really no built-in method in Synchronet to do that (support external "quoters"). If you just want to use nano as an editor and don't need anything from SlyEdit, the proper way would be to configure nano in SCFG->External Programs->External Editors.
Understood. What we've done here is basically strip those mentioned functions out of SlyEdit, and along with some added error checking as well as checking to make sure QUOTES.TXT is present (if not, edit the message as "new"), and check for modifications to MSGTMP (if not, abort the message), and then nano is ran from the script using bbs.exec().
So basically I think we've gotten it to the point where you can run ?msgQuoteWrap.js "/usr/bin/nano [-opts]" %f from the command line in External Editors, the script takes care of the options and editor you choose,aand away you go!
With this being said, vi(m) also seems to work, although it seems some of the backspace/delete stuff may have to be tinkered with on my end, but that's minimal.
Regards,
Nick
---
þ Synchronet þ thePharcyde_
telnet://bbs.pharcyde.org (Wisconsin)