Yes, that should work.
I do think we should still check if the current tab is an xhtml file or an opf file and if not return an error like we did back in the Sigil 1.5.1 timeframe with launchWithXEditor.
I will add that in.
This still won't help BetterRed as his way of doing it is just not setting the necessary file waters unless that code exists someplace else in Sigil and we just do not know it. This code base is getting big and even after more than 5 years I still do not know everything about the code yet. I will search Sigil to see if that is the case.
If not, BetterRed, you should use the keyshortcut for the XEditor when using PageEdit when the OPF is passed and not Open Width as some of your changes could be lost otherwise.
Quote:
Originally Posted by DiapDealer
For advanced users, the current (1.7) code would allow someone to "trick" the Launch External xHTML Editor into watching all of the xhtml resources while sending the full path of the opf file (as well as the currently selected xhtml resource) to something other than PageEdit. Just create a script named "pageedit" (or pageedit.bat or pageedit.cmd on Windows) and define it as the External xHTML Editor. That should open the door to custom parsing of the opf and the potential to create custom routines for editing multiple xhtml resources.
|