搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

FF Does Not Let Me Use My Editor to Edit & Save HTML

  • 8 个回答
  • 1 人有此问题
  • 1 次查看
  • 最后回复者为 Jill24

more options

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.

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.

被采纳的解决方案

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?

定位到答案原位置 👍 1

所有回复 (8)

more options

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.

more options

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.

more options

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于修改

more options

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.

more options

Try to escape the backslashes: "C:\\Kedit16\\KEDITW32.exe"

more options

Thanks for the suggestion, cor-el. But it didn't fix it.

more options

选择的解决方案

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?

more options

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!