FF Does Not Let Me Use My Editor to Edit & Save HTML
I changed About:Config --> View_source.editor.external to True. And View_source.editor.path to the location of my editor (Kedit). FF does not open the source with my editor [web Developer --> Page Source]. And whatever it is opening it with does not allow saving changes.
This worked on FF on XP (though it may have been an earlier release of FF there) and FF used my editor, which let me change and save the code, but is not working with FF on W7 (FF = Rel 44.0)
Can anyone suggest what I am missing here? (I do not want to get involved with Firebug).
Thank you for your help.
Chosen solution
Hmm, I tested with Notepad++
With the path from the shortcut --
"C:\Program Files (x86)\Notepad++\notepad++.exe"
-- it was ignored and Firefox displayed the source in a tab.
However, it worked when I removed the quotation marks:
C:\Program Files (x86)\Notepad++\notepad++.exe
That's surprising, since there's a space in the path.
What if you edit out the quotation marks on yours?
Ler a resposta no contexto 👍 1All Replies (8)
You can check the path to the external editor with this code in the command line of the Browser Console.
viewSourceAppPath = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch) .getComplexValue("view_source.editor.path",Components.interfaces.nsIFile); viewSourceAppPath.path;
You can open the Browser Console (3-bar Menu button or Tools > Web Developer). Toggle devtools.chrome.enabled to true on the about:config page to enable the command line in the Browser Console.
Paste the JavaScript code in the command line. Press the Enter key to evaluate the JavaScript code.
Thank you cor-el.
'[Exception... "Component returned failure code: 0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsIPrefBranch.getComplexValue]" nsresult: "0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH)" location: "JS frame :: debugger eval code :: <TOP_LEVEL> :: line 1" data: no]'
This is what I got back - I don't understand it. The path in About:Config was copied/pasted directly out of the shortcut's Properties --> Target. Looking at it in About: Config it is identical to that target. So I do not understand why it is returning an ERROR_FILE_UNRECOGNIZED_PATH.
That could possibly mean that this pref doesn't exist or have an incorrect path name that can't be resolved to a local path.
What is the current value of the file path?
Did you make sure that the view_source.editor.path exists and that view_source.editor.external is true. If you need to pass parameters, see: view_source.editor.args
cor-el modificouno o
As a test, I just went into IE Web Developer Tools. I selected Customize IE View Source and pointed it to the editor in the same location as I put into About:Config. IE found it and now when I open IE HTML source it does it using my editor. So as IE can do it, the problem must be within FF.
To answer your questions: 1) yes, it exists (see above) 2) Yes, it is set.
The value of the FP is: "C:\Kedit16\KEDITW32.exe"
See attached snapshot of About:Config.
Try to escape the backslashes: "C:\\Kedit16\\KEDITW32.exe"
Thanks for the suggestion, cor-el. But it didn't fix it.
Chosen Solution
Hmm, I tested with Notepad++
With the path from the shortcut --
"C:\Program Files (x86)\Notepad++\notepad++.exe"
-- it was ignored and Firefox displayed the source in a tab.
However, it worked when I removed the quotation marks:
C:\Program Files (x86)\Notepad++\notepad++.exe
That's surprising, since there's a space in the path.
What if you edit out the quotation marks on yours?
Success!! That was it. I removed the quotation marks and it works!.
Thank you jscher300 for taking the time to try it and to help me!! I truly appreciate it very much!