Този сайт ще има ограничена функционалност, докато се извършва тече неговата поддръжка. Ако дадена статия не може реши проблема ви и искате да зададете въпрос, нашата общност е готова да ви помогне на @firefox в Twitter и /r/firefox в Reddit.

Търсене в помощните статии

Избягвайте измамите при поддръжката. Никога няма да ви помолим да се обадите или изпратите SMS на телефонен номер или да споделите лична информация. Моля, докладвайте подозрителна активност на "Докладване за злоупотреба".

Научете повече

How to edit the source code of a local HTML file

  • 4 отговора
  • 1 има този проблем
  • 707 изгледи
  • Последен отговор от Stephan Weber

more options

How to edit the HTML-code of a local stored file been displayed in a tab of mozilla Firefox?

In Opera 12.16 in context menu an menu exists for that. Could not give more details on that because the system admins forbid to use that outdated software a few days ago. In the settings of Opera I font an Option to replace the built in editor with my favorite Notepad++.exe.

In that context menu on line below or above a meneu entry allowed to call the W3C.org Verifyer of the HTML-source code.

This few simple things allowed me to edit some HTML and CSS files to create HTML pages on my notebook and copying them on a server in local network made a simply knowledge sharing project up and running.

Since I am lo longer allowed to use Opera 12.16 I am searching for a similar solution within the mozilla Firefox. version 88. While looking at and searching in the list containing over 1200 add-ons I have fount W3C Validator but till now no solution for the editing task.

Please help

Best regards

Stephan Weber

How to edit the HTML-code of a local stored file been displayed in a tab of mozilla Firefox? In Opera 12.16 in context menu an menu exists for that. Could not give more details on that because the system admins forbid to use that outdated software a few days ago. In the settings of Opera I font an Option to replace the built in editor with my favorite Notepad++.exe. In that context menu on line below or above a meneu entry allowed to call the W3C.org Verifyer of the HTML-source code. This few simple things allowed me to edit some HTML and CSS files to create HTML pages on my notebook and copying them on a server in local network made a simply knowledge sharing project up and running. Since I am lo longer allowed to use Opera 12.16 I am searching for a similar solution within the mozilla Firefox. version 88. While looking at and searching in the list containing over 1200 add-ons I have fount W3C Validator but till now no solution for the editing task. Please help Best regards Stephan Weber

Избрано решение

Note that Firefox allows to use an external application to be used for viewing the page source, so you can specify your preferred editor.

You can find these prefs on the about:config page to set what external viewer/editor to use.

  • view_source.editor.args
  • view_source.editor.external = true
  • view_source.editor.path

You can paste this code in the Browser Console to check that the path is valid.

try {
  var viewSourceAppPath = Services.prefs.getComplexValue("view_source.editor.path", Ci.nsIFile);
  console.log(viewSourceAppPath.path)
} catch (ex) {Cu.reportError(ex);}

Прочетете този отговор в контекста 👍 1

Всички отговори (4)

more options

Hi Stephan, I don't think Firefox has a built-in feature to edit HTML pages on disk.

What do you think about stepping up to a more sophisticated editor? The one I'm going to try next is widely recommended and has built-in validation:

You can add on a previewer, or switch to Firefox and reload, depending on your preference.

(It's from Microsoft, but free and designed to work with open technologies.)

more options

Избрано решение

Note that Firefox allows to use an external application to be used for viewing the page source, so you can specify your preferred editor.

You can find these prefs on the about:config page to set what external viewer/editor to use.

  • view_source.editor.args
  • view_source.editor.external = true
  • view_source.editor.path

You can paste this code in the Browser Console to check that the path is valid.

try {
  var viewSourceAppPath = Services.prefs.getComplexValue("view_source.editor.path", Ci.nsIFile);
  console.log(viewSourceAppPath.path)
} catch (ex) {Cu.reportError(ex);}

more options

Hello Jefferson Scher and cor-el

thank you both for your quick response and good solutions.

The idea from Jefferson Scher is worth a try on 2nd priority. But I'd like to try the solution from cor-el first since it seams that is easier. (Sorry I could'n find your name so have to use you user name).

But I have some more questions on that. Where could I find the mentioned about:config page to do the required setting? Sorry but I missed to mention I'm using mozilla Firefox in German.

Thats what I have tried till now

Extras | Einstellungen Perhaps in English something like Extras | Settings

Here I get a hint (i) Der Browser wird durch ihre Organisation verwaltet Perhaps in English somthing like (i) The browser is manage by your organization

I tried using the search field behind that hint telling me In Einstelllungen suchen Perhaps in English somthing like Search settings

I typed into that filed about:config hoping that could lead me to the relevant location. But that didn't work.

Perhaps because I have only restricted access to the setting mentioned above?

Thanks for supporting me again.

Best Regards

Stephan Weber

more options

Hello again,

meanwhile I have solved this. I opened a new tab and entered about:config as URL therein. After that I could enter the 3 variables and that works as expected.

Thank you.

Best regards

Stephan Weber