The following applications provide integrated support for CSS HTML Validator. You can use CSS HTML Validator by itself, or with one of these programs.
Developers: It's easy to support CSS HTML Validator in your own applications.
If you're using an editor that allows you to run a tool or other program then you may be able to configure it to run CSS HTML Validator and open the current document. You can then press F6 to validate the document in CSS HTML Validator's editor.
To open a file in the editor, call cmdlineprocessor.exe
(included with CSS HTML Validator) with the -o
parameter followed by the full path of the file that you want to open in the editor.
Below are instructions on how to do this for various programs.
Eclipse: Go to Run > External Tools > External Tools Configurations and then right-click on Program and choose New. Enter a name (we recommend "CSS HTML Validator Editor"). For the Location enter:
C:\Program Files\HTMLValidator240\cmdlineprocessor.exe
For the Arguments enter:
-o "${resource_loc}"
Change to the Common tab and check the box next to External Tools in the Display in favorites menu section. Click Apply then Close.
If desired, you can setup a keyboard shortcut for the Run Last Launched External Tool command in Window > Preferences > General > Keys.
Note that a resource must be selected or you may get an "variable references empty selection" error for ${resource_loc}
.
EmEditor: Go to Tools > External Tools > Customize Tools and configure a new tool (we recommend titling it "CSS HTML Validator Editor") to run the following command:
C:\Program Files\HTMLValidator240\cmdlineprocessor.exe
With the following arguments:
-o "$(Path)"
Make sure the Save File option is checked and the Use Output Bar option is not checked.
Notepad++: Go to Run > Run (or press F5). Enter the following for the program to run:
"C:\Program Files\HTMLValidator240\cmdlineprocessor.exe" -o "$(FULL_CURRENT_PATH)"
Click the Save button and enter a shortcut name (we recommend "CSS HTML Validator Editor"). Assign a keyboard shortcut if desired then click OK. Click Run or Cancel (either way your new shortcut should now be created in the Run menu). Note that you should save any changes to the current document in Notepad++ before running the new command or CSS HTML Validator will not see the changes when it opens the file.
NEW! Also, see this post by Meta Chuh about Notepad++ integration with CSS HTML Validator (new window).
NoteTab: This will require creating a new clip. Open the clip library that you want to add the new clip to (or create a new clip library). Right-click in the clip library and select Add New Clip. We recommend naming the clip "CSS HTML Validator Editor". The clip editor will open. Copy the following into the clip editor:
^!TOOLBAR Save Document ^!Shell "C:\Program Files\HTMLValidator240\cmdlineprocessor.exe" -o ^## ^!FocusApp CSS HTML Validator*
Press Ctrl+S to save and then Shift+Ctrl+E to close the clip editor. You should now be able to click on the new clip to 1) save the current document, 2) open it in CSS HTML Validator, and 3) set the application focus to CSS HTML Validator.
Sublime Text: Go to Tools > Build System > New Build System. A default build document should open. Replace it with the following:
{ "cmd": ["C:\\Program Files\\HTMLValidator240\\cmdlineprocessor.exe", "-o", "${file}"] }
Go to File > Save (or press Ctrl+S) and save it as CSS HTML Validator Editor.sublime-build
in Sublime Text's Packages\User
folder (something like C:\Users\(username)\AppData\Roaming\Sublime Text 3\Packages\User
).
With the "CSS HTML Validator Editor" build system selected (Tools > Build System > CSS HTML Validator Editor), you can use Tools > Build (or Ctrl+B) to perform a build, which will save the current document and then open it in CSS HTML Validator.
TextPad: Go to Configure > Preferences and the Tools page. Choose Add > Program and select "C:\Program Files\HTMLValidator240\cmdlineprocessor.exe
" (note that this file may be in a different location on your system). Click on "Cmdlineprocessor" to rename it (we recommend "CSS HTML Validator Editor") and then click Apply. Now that the new tool is added, click the "+" next to Tools and select the tool that you just added. In the Parameters field enter -o $File
. Note that you do not need to check the Save all documents first option because the active document is always saved.
TIP: Take note of the keyboard shortcut TextPad assigns for quick access (like Ctrl+1).
UltraEdit/UEStudio: Go to Advanced > User tools > Configure tools (or Advanced > Tool Configuration) and configure a new tool (we recommend giving it a menu item name of "CSS HTML Validator Editor") to run the following command line:
"C:\Program Files\HTMLValidator240\cmdlineprocessor.exe" -o "%f"
In the Options tab, check the Save active file option.
Visual Studio: Go to TOOLS > External Tools and select Add. For the Title enter "CSS HTML Validator Editor". For the Command enter:
C:\Program Files\HTMLValidator240\cmdlineprocessor.exe
For the Argument enter:
-o $(ItemPath)
Click OK. To open a document in CSS HTML Validator from Visual Studio you can then choose TOOLS > CSS HTML Validator Editor. Visual Studio may not save the document first so if you want to save any changes to a document before opening it in CSS HTML Validator then be sure to save the document first.
Note that these instructions were made based on Microsoft Visual Studio 2013 and may be different in other versions.
XML ValidatorBuddy: Visit Using CSS HTML Validator as external tool in XML ValidatorBuddy (new window)
Some editors support an 'output window' that can show the messages from CSS HTML Validator. Some of these editors also support the ability to click on a message in the output window and be taken to the proper line number in the document. Below are some instructions on how to set this up.
Eclipse: Go to Run > External Tools > External Tools Configurations and then right-click on Program and choose New. Enter a name (we recommend "CSS HTML Validator Editor"). For the Location enter:
C:\Program Files\HTMLValidator240\cmdlineprocessor.exe
For the Arguments enter:
-e,(stdout),0,128,'%Type%%where%: %category2%%msgtext%' "${resource_loc}"
Change to the Common tab and check the box next to External Tools in the Display in favorites menu section. Set the Encoding to Other and UTF-8. Click Apply then Close.
The new command should be now be available from the Run > External Tools menu and from the toolbar. In fact, you just need to click on the External Tools toolbar button to run the last external tool.
If desired, you can setup a keyboard shortcut for the Run Last Launched External Tool command in Window > Preferences > General > Keys.
Unfortunately you cannot click on a validator message and be taken to the correct line in the source document. This feature is not available in Eclipse for external tools at the time of this testing.
Note that a resource must be selected or you may get a "variable references empty selection" error for ${resource_loc}
.
EmEditor: Go to Tools > External Tools > Customize Tools and configure a new tool (we recommend titling it "CSS HTML Validator") to run the following command:
C:\Program Files\HTMLValidator240\cmdlineprocessor.exe
With the following arguments (for EmEditor v16.0 and above):
-e,(stdout),0,128,"%file%(%linenum%:%charnum%): %category2%%msgtext%" "$(Path)"
Or with the following arguments for versions below v16.0:
-e,(stdout),0,128 "$(Path)"
Make sure the Save File and Use Output Bar options are checked, Input is set to 'None', and the output encoding is set to UTF-8.
Sublime Text: Go to Tools > Build System > New Build System. A default build document should open. Replace it with the following:
{ "cmd": ["C:\\Program Files\\HTMLValidator240\\cmdlineprocessor.exe", "-e,(stdout),0,128,'%file%(%linenum%:%charnum%):", "%category2%%msgtext%'", "${file}"], "file_regex": "^[ ]*(.*)\\(([0-9]*):([0-9]*)\\)" }
Go to File > Save (or press Ctrl+S) and save it as CSS HTML Validator.sublime-build
in Sublime Text's Packages\User
folder (something like C:\Users\(username)\AppData\Roaming\Sublime Text 3\Packages\User
).
With the "CSS HTML Validator" build system selected (Tools > Build System > CSS HTML Validator), you can use Tools > Build (or Ctrl+B) to perform a build, which will save the current document, validate it, and then show the results in the console window. You can use F4 to scroll through the validator messages (Shift+F4 goes backwards).
TextPad: TextPad will automatically detect CSS HTML Validator and add a Tools > HTML Validator menu option (with a Ctrl+0 shortcut) that will display the validation results in TextPad's Tool Output window.
UltraEdit/UEStudio: Go to Advanced > User tools > Configure tools (or Advanced > Tool Configuration) and configure a new tool (we recommend giving it a menu item name of "CSS HTML Validator") to run the following command line:
"C:\Program Files\HTMLValidator240\cmdlineprocessor.exe" -e,(stdout),0,128 "%f"
In the Options tab, check the Save active file option. In the Output tab select the Output to list box radio button and check the Capture output option.
We encountered issues with these editors when we tried them with CSS HTML Validator.
NetBeans: Unfortunately this IDE does not currently and natively support running external tools (see Add ability to configure external tools and invoke them (new window)). You can install the QuickOpener plugin (Tools > Plugins) and run a custom command through that but we found it unnecessarily time-consuming, limited, and buggy. However, if you want to try it then the command to launch to open the current document in CSS HTML Validator's editor would be something like:
"C:\Program Files\HTMLValidator240\cmdlineprocessor.exe" -o ${currentFile}