4.2
JSHint 2.3.0 included
Removed some legacy options from JSHint configuration
Use any JSHint option, there’s a text field in which you can enter JSHint config options. (separated by comma).
A list of valid options can be found here: jshint.com/docs/options/
Rewritten JSHint-Wrapper (because JSHint works a bit differently now)
Removed some legacy JSHint options
4.1
Bugfix for a very improbable exception
Code update (mostly internal stuff)
Dialog layout improved when resized
4.0
CSSTidy updated to the current development release. This should now correctly format CSS inside @media-tags.
Integrated HTML 5 compatible tidy for validation and reformatting
3.9
New: Validate JS on save (Coda 2 only)
New: Separate CSS minification included
Fix PHP validation on save with selection
Laxcomma setting for JSHINT
JSMinify updated
3.8
Lots of bugfixes
Compatibility with other plugins improved
JSMinify updated
3.7
New: Minify on Publish (Coda 2 only)
New: Modify file extension list for PHP validate on save
Check if Growl is present, includes Growl 1.2 and Growl 1.3 notifier
CSSTidy: New option Remove last ; – control if the last ; in a block is removed or not
CSSTidy: Workaround for wrong @import behavior
JSHint: Doesn’t report useless strict warnings anymore
JSHint: Removed unused –safe option
JSHint: Added link to option documentation in the preferences
CSSTidy/JSMinify: CR/LF handling improved
PHPTidy won’t try to format php files with syntax errors
Rewritten launching of php based tools, more robust now
Refactoring PHP error display
Performance/memory improvements
Preferences layout improved, added Google+ link
3.6
“Unified” version for Coda 1 and Coda 2
Checks automatically if accidentally more than one plugin is installed
New function: PHP validate on save (Coda 2 only)
Javascript JSHint: Updated to a new version
Javascript Tidy (JSBeautify): Update to latest version, no file size limit anymore, CR/LF handling correctly now
CSS Tidy: Update to latest version, CR/LF handling correctly now
Performance improvements (loading time, js functions)
New version notification now shows the new version number…
Plugin path is now correct for Coda 1 and Coda 2
3.5 beta
Coda 2 compatible version
New preference setting for JSHint: Use smart tabs
“Go to line” (for PHP errors) now uses the API function in Coda 2, so it scrolls to the error location
Automatic update should now work correctly with Coda 1 and Coda 2
3.4
Remove proCSSor because the API service has been cancelled
3.3
Small bugfix for Prefs window layout
Internal structure improvement
Fix (improbable) memory leak
3.2
Validate PHP syntax before performing PHPtidy
Minify CSS
Updated CSSTidy
Preferences window improved (links to twitter/fb/donate)
JS Hint: Many more options
JS Hint: Respect line endings, whitespace warnings now correct
JS Tidy: Respect line endings
3.1
JS Tidy now also configurable
proCSSor bugfix
Respect Tabs/Spaces where available
Automatic Update (finally..!!)
Improved validation results
JS Hint updated
PHPTidy improvements
JS Hint: Remove (quite useless) “unsafe character” warning
Result window looks cooler now
Modularized the code
Modularized the code
Prefs window improved
3.0
Use selection
Growl (and growl-like) notifications
Results as floating window
More preferences for PHPTidy
HTML online validation: Included three validator settings
Drop curl, use cocoa instead
Use JSC call instead of shell script
JShint preferences
Improved preferences layout
Bugfixes, lots of
Nearly complete code rewrite
2.7
Show an short message after updating (only once)
Updated CSSTidy to 1.3.1
HTML Validate output improved
HTML5 support
aka workaround for tidy
JSLint replace by JSHint (upgrade, kind of)
Preference for PHPTidy: Fix statement brackets
2.6
Preferences for PHPTidy: New lines, Whitespaces, Comma spacing
Bugfix for umlaut conversion with JSTidy
2.5
Set CSS Level for validation (2, 2.1, 3)
Configure PHPTidy braces placement
2.4
Warning message (incompatible plugin) improved
Before accessing proCSSor, check if incompatible plugin present
2.3
TidyCSS update (current SVN)
W3C online response much more readable
Check for incompatible SBJsonParser
Error messages improved
Updatecheck circumvents cache now
2.2
New: Beep only for PHP validation
Preferences window now remembers the open tab
Preferences window revamped (again..)
Shortcuts also shown in the preferences
HTML Tidy version in about window now modified if “use internal” is changed
Improved some tooltips in the preferences
2.1
New: procssor.com configurable
New: JSBeautifier included
About window now part of the preferences
Preferences window revamped
Code clean-up
Shortcut for JS Beautifier
2.0
New: Encoding automatically selected
New: Custom HTML tidy configuration
New: Included a more recent HTML tidy binary
New: procssor.com online service included (experimental)
Goto line now works correctly with different line endings
Line endings now respected in HTML tidy, CSS tidy and PHP tidy
HTML tidy version shown in the about page
Preferences window new layout
JS lint now correctly handles backslashes
Error messages improved
Message sheet layout improved
1.9
New: JS Minify
HTML Validation report window now can be close without the annoying “Save Changes”-question
“Reveal in Finder” bugfix at preferences page
Donation button in the about window (Hint: click it :)
1.81
CSS tidy now handles CSS3 values starting with a dash (-)
Keyboard shortcuts for CSS tidy and Preferences
Some code clean-up
1.8
Javascript Lint (JSLint) now included
Update check now daily instead of each time Coda starts
New CSS tidy configuration: Sort attributes
1.7
HTML tidy now configurable (in the Preferences) !
Preferences are automatically saved
Bugfix when saving Coda Prefs
1.62
Automatic update check now in the background (asynchronous)
CSS tidy now configurable (in the Preferences) !
Less intrusive error-messages on connection failures
1.6
User Preferences
Automatic check for updates
CSS tidy integrated
Structured Menu (aka Submenus)
Using the HTML-tidy version delivered with OSX (PowerPC compatible)
Redesigned the error- and “validation okay”-sheets XCode-like
More encodings: ASCII, UTF-16, Windows CP-1252
All functions use the current buffer contents now
Error messages not explicitely state their origin
Updated phptidy to current version 2.10
1.4
W3C-Validation online for HTML-files
W3C-Validation online for CSS-files
Help button (on the about sheet) now opens this page
1.31
W3C-Validation service, 1st try
1.3
Improved Sheet display
Bugfixes
1.13
Validate HTML (via tidy)
Jump to error line – if PHP validation finds an error
Check for Updates (in the about-box)
File encoding can be chosen
Nice sheets, no more of those ugly alert-boxes
Menu items are only available if they should be
Lots of code cleanup
More useful “About”-dialogue, link to the plugin homepage
0.96
“About..”-dialog
Improved exception handling
Bugfixes
0.9
New features: HTML tidy, Strip PHP, PHP tidy
Included HTML Tidy
Included phptidy
Bugfixes
0.85
Bugfixes, dialogs updated
0.8
Initial release
Thanks Mario, I can’t believe I’ve been using Coda this long without it! One feature request: I regularly publish large data tables that genuinely benefit from html minification. Currently “tidy html” with the configuration “high compression” still doesn’t take out line breaks. Hmm… One might think one could do that as a supplementary step with Text > Processing > Remove Line Breaks, but that command actually just replaces line breaks with spaces (?!). I’ve complained about this to Panic but no fix in sight yet. So a “remove newlines” option in the “HTML Tidy” config would be handy. For something more aggressive (if you’re feeling generous) maybe you could incorporate kangax’s full-fledged minifier as a separate option: http://kangax.github.io/html-minifier/ The code is on github. It’s marked experimental but I’ve used it a lot over the past year and never had any problems. Would love to see it plugged in to Coda.
Hi –
yes, html tidy isn’t perfect of course – but for most cases it does the job. Removing newlines isn’t possible with HTML tidy (I think) – and since it’s a binary I can’t easily add more stuff :)
But I think “Minify JS” should do the trick, just tried out some example files. It didn’t work in all cases though. Maybe as a workaround for some files.
Kangax’s minifier: Looks good. Javascript is not the best language to integrate (at least via Cocoa/OSX..), but it should be possible.
The only thing is: Maybe in 3 months, maybe in 3 weeks.. (I’ll have a look the next days how easy it would be to integrate)
mario
AWESOME plugin! Any chance we can get some xml/json love?
If there’s a good, free and open source formatter/validator for JSON or XML I can have a look of course. It depends a lot on the software and how much effort it’s to integrate it. So if you know some tool – just drop me a line here and I can have a look.
Hi Mario,
Hey thanks for the reply!
I’d have to think the logic for the xml would be pretty much exactly as html, I’ve never really looked into making a Coda plugin before, maybe I’ll give it a try. I really don’t want to try to build all of what you’ve built though because it’s basically perfect and why reinvent the wheel.
Would you care to collaborate on it? If you have an example of the html formatting I could check out I’d gladly contribute it to your project, xml at least. I’m pretty sure I could probably figure out the json part as well.
Thanks! And again, awesome plugin!
Travis
Currently I use external tools which are executed from the plugin and the return value is being parsed.
For example CSStidy (written in PHP), HTML tidy (as binary), JS-Tools (mostly in JS).
I assume for XML and JSON there are already useful tools out there, but since now I haven’t looked for them…
And thanks for your offer, let’s continue via email, just write to mario at chipwreck dot de.
Hey,
I’m trying to use the tidy HTML shortcut… but it doesn’t work??
Anyone else had this issue?
Can I change the shortcut at all?
Thanks.
The shortcut can’t be changed (not without modifying the plugin). Is there maybe a conflict with another plugin?
Love it. Thank you so much!!!
Great Plug in
How do I prevent Tidy HTML from stripping out CMS specific tags, such as:
<perch:label …
<perch:input …
<perch:error …
Select “custom..” as configuration for tidy and add the tags after “new-blocklevel-tags” or “new-inline-tags” – that shall do the trick.
Great Plugin thanks alot!
I have an issue where the html tidy strips out a closing / on my images. I need them to be there to not cause issues when using this code with xslt. Is there any setting in the custom section I can set or change that would stop it from stripping the closing /?
Thanks!
Therefore the document must be valid XHTML, then the closing / is syntactically correct.
So if you use the following header, HTML Tidy won’t strip the closing / :
...
...
Tidy HTML will erase list tags that don’t have text in them such as:
i .. /i
In this sample I am using an icon and do not want to add text.
Cheers
Yes, that’s how tidy works. You can use a non-breaking space (ampersand + nbsp + semicolon) as a workaround.
Awesome plugin mate! Thank you SO much!
… While it worked. Not sure what I did, or if I did anyting, but suddenly all actions are greyed out in the PHP, CSS, JS and HTML sub-menus, i.e. I can’t do any more validations or tidying…
Have also removed and reinstalled the plugin, but same problem. Using latest version 4.0, and it worked just fine yesterday!
Any pointers?
Thanks so much,
Florian
Make sure you have a file with more than just a few characters open – the menu items are only greyed out if there’s no active editor (or if the editor window contains no text (= less than some characters).
Hope that helps – otherwise write a mail, then we’ll have to debug it.
I have the same problem, even with rather large HTML files. Re-installed and restarted several times.
So all items are greyed out even when the editor is active?
Yes, exactly. I’m running in full-screen mode, but it’s the same when not in full-screen mode.
Okay..:
Please enable “debug mode” in the advanced section of the plugin preferences, open “Console”, start using Coda 2 and copy all the lines from the console which contain “Coda PHP Toolkit” and send them to me ( mario at chipwreck dot de) – thx!
Have you considered leveraging this as a PHP formatting option? Just as an alternative to self configured PHP Tidy?
It appears that this is based off of PHP-FIG (PSR-0, PSR-1, PSR-2) which is commonly agreed upon standards across most of the major frameworks.
Available via both PEAR and SensioLabs download
PEAR – http://pear.php.net/package/PHP_CodeSniffer/redirected
SensioLabs – http://cs.sensiolabs.org/
I second this. This is by far my favorite plugin for Coda and frankly I wouldn’t use Coda if this plugin weren’t available. The only addition I would ask for is having the ability to choose the coding standard you want the “php tidy” to use. I’m currently inheriting a lot of projects where no standard was used so it would be nice to clean them all up using the psr-2 standard before I begin working on them. I’ve already installed php cs fixer and the php-md etc for Sublime, which isn’t nearly as nice as Coda. Would be great if the toolkit could run these tools when saving or upon command.
PHPtidy doesn’t offer something like PSR-2, unfortunately. php-cs-fixer also came to my mind, I didn’t have a deeper look if and how difficult it would be to integrate.
Currently (okay: the last months) I’ve got lots of other things eating my time, but along with html5-tidy (if possible with tabs) this is on the top of my todo-list.
Works great. Thank you.
The only thing I cannot modify through the preferences or the phptidy-coda.php file is the curly brace after functions going to a new line.
Setting $curly_brace_newline = false; does not seem to be the answer.
Also, occasionally and on files not authored in Coda, we see conditions dropping to a new line i.e.
if/else newline ( condition )
We correct this using a regexp .. and then next Tidy it will not happen.
I love this plug-in!!! Thank you very very very very very very much!!!
thanks – nice to hear :)
omg, you’re a star. Thankyou.
:)
Great plugin!! Thanks!
:)
I have the “Validate on save” option picked for JavaScript files with the “Results in Floating Window” option. However, a new window is generated after each save (even for the same file). Could you just replace the contents instead?
Hi –
okay, is notified and I’ll have a look the next days.
I love this plugin, but have found one annoyance. I use jQuery and jQueryUI extensively, and JSHint doesn’t like the jQuery syntax :-(. Any plans for adding that syntax so I don’t get a huge list of non-errors? Regardless, thanks for this!
Hi –
have a look here on how to validate correctly: http://docs.jquery.com/JQuery_Core_Style_Guidelines#JSLint
Ahh, I see. Thanks.
Greetings,
I’ve been evaluating Coda 2 and frankly I decided to buy it based on how great this plugin is!
Unfortunately, everything was working until I moved Coda 2 from Downloads to Applications. Now none of the features work in the plugin. For example when I minify JS I get “JSMinify returned nothing – Make sure the file has no errors, try using UTF-8 encoding.”
I get this error if I try to tidy PHP as well. So I removed the plugin and re-installed it…and no dice. Still getting the error. Setting the file to UTF-8 didn’t help.
Please help– this is such a great plugin I’m having withdrawal symptoms!
Thanks,
-NorthK
This is what the console error shows:
Application Specific Information:
Performing @selector(doJsTidy) from sender NSMenuItem 0x10ba752c0
*** multi-threaded process forked ***
*** NSTask: Task create for path ‘/Applications/Mamp/bin/php/php5.4.4/bin’ failed: 22, “Invalid argument”. Terminating temporary process.
Hi –
this seems to be a problem with your php installation. Usually the plugin uses the default OSX php installation (/usr/bin/php). In your case it seems the PHP path is set to the MAMP installation. Please check in the plugin advanced preferences if you can set it back to /usr/bin/php.
Hi Mario, you were right. For some reason the plugin didn’t like executing MAMP’s version of PHP. I must have changed the default setting and forgotten about it.
It’s working now– thanks so much for your help and for writing a great plugin!
-NorthK
FOR CODA 2, When using VALIDATE HTML and TIDY HTML, there is error as below:
NSInvalidArgumentException
Reason:
launch path not accessible
How to work it out?
Hi –
this usually points to a problem with your php installation. Please check the php path in the plugin preferences (advanced). It is usually “/usr/bin/php”. Then open Terminal and enter the given path, like “/usr/bin/php -v” (without quotes) and check what the result is. If there’s an error message it hints to a defect php installation.
When entered “/usr/bin/php -v” (without quotes) , It says:
PHP 5.3.15 with Suhosin-Patch (cli) (built: Aug 24 2012 17:45:44)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
No error, does it mean no problem with my php installation? BUT I still got the error msgbox…
Okay, your php installation looks fine – now please enable “debug mode” in the advanced section of the plugin preferences, open “Console”, start using “Validate HTML” and copy all the lines from the console which contain “Coda PHP Toolkit” and send them to me or copy them to a comment..
Please see the code below:
Coda 2[13383]: [Coda PHP Toolkit] Executing at path /Users/xu/Library/Application Support/Coda 2/Plug-ins/PhpPlugin.codaplugin/Contents/Resources/tidy with (
“-config”,
“/Users/xu/Library/Application Support/Coda 2/Plug-ins/PhpPlugin.codaplugin/Contents/Resources/tidy_config_check.txt”,
“–newline”,
LF,
“-utf8”
)
13-1-29 上午8:42:31.376 Coda 2[13383]: Exception occurred: 0 ExceptionHandling 0x00000001009f3637 NSExceptionHandlerExceptionRaiser + 174
1 libobjc.A.dylib 0x00007fff91c023f0 objc_exception_throw + 43
2 CoreFoundation 0x00007fff8e99ae7c +[NSException raise:format:] + 204
3 Foundation 0x00007fff90845cd2 -[NSConcreteTask launchWithDictionary:] + 409
4 PhpPlugin 0x000000010ffcb46b -[CwPhpPlugin filterTextInput:with:options:encoding:useStdout:] + 594
5 PhpPlugin 0x000000010ffcac62 -[CwPhpPlugin validateWith:arguments:called:showResult:useStdOut:alwaysWholeBuffer:] + 246
6 PhpPlugin 0x000000010ffc6812 -[CwPhpPlugin doValidateHtml] + 261
7 AppKit 0x00007fff8b7a5a59 -[NSApplication sendAction:to:from:] + 342
8 AppKit 0x00007fff8b8db44c -[NSMenuItem _corePerformAction] + 406
9 AppKit 0x00007fff8b8db13a -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 133
10 AppKit 0x00007fff8b5c846f -[NSMenu _internalPerformActionForItemAtIndex:] + 36
11 AppKit 0x00007fff8b5c82f7 -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 135
12 AppKit 0x00007fff8b8d4245 NSSLMMenuEventHandler + 342
13 HIToolbox 0x00007fff89c0af0a _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1206
14 HIToolbox 0x00007fff89c0a3d9 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 410
15 HIToolbox 0x00007fff89c201bd SendEventToEventTarget + 40
16 HIToolbox 0x00007fff89c56e89 _ZL18SendHICommandEventjPK9HICommandjjhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef + 443
17 HIToolbox 0x00007fff89bfbc11 SendMenuCommandWithContextAndModifiers + 59
18 HIToolbox 0x00007fff89bfbbc3 SendMenuItemSelectedEvent + 254
19 HIToolbox 0x00007fff89bfba4f _ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2_ + 94
20 HIToolbox 0x00007fff89bd7aab _ZL14MenuSelectCoreP8MenuData5PointdjPP13OpaqueMenuRefPt + 605
21 HIToolbox 0x00007fff89bd70b8 _HandleMenuSelection2 + 565
22 AppKit 0x00007fff8b7939c6 _NSHandleCarbonMenuEvent + 245
23 AppKit 0x00007fff8b6b5b7f _DPSNextEvent + 2073
24 AppKit 0x00007fff8b6b4ed2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
25 AppKit 0x00007fff8b6ac283 -[NSApplication run] + 517
26 AppKit 0x00007fff8b650cb6 NSApplicationMain + 869
27 Coda 2 0x00000001000020f4 start + 52
28 ??? 0x0000000000000002 0x0 + 2
13-1-29 上午8:42:31.377 Coda 2[13383]: [Coda PHP Toolkit] Exception NSInvalidArgumentException launch path not accessible launch path not accessible
This is strange..
So:
1. Please open Terminal and enter the following line (with quotes), press Return and send me the result:
“/Users/xu/Library/Application Support/Coda 2/Plug-ins/PhpPlugin.codaplugin/Contents/Resources/tidy” -v
2. Which Mac and which OS X-version do you use?
thx!
1. the result is “Permission denied”
2. mac mini 2011, OSX 10.8.2
Okay, “Permission denied” isn’t correct. But I’ve currently no idea how this might happen..
Please try this command and check if it helps:
chmod +x “/Users/xu/Library/Application Support/Coda 2/Plug-ins/PhpPlugin.codaplugin/Contents/Resources/tidy”
It says:
chmod: “/Users/xu/Library/Application: No such file or directory
chmod: Support/Coda: No such file or directory
chmod: 2/Plug-ins/PhpPlugin.codaplugin/Contents/Resources/tidy”: No such file or directory
i dont know why? Because this file “/Users/xu/Library/Application Support/Coda 2/Plug-ins/PhpPlugin.codaplugin/Contents/Resources/tidy” is exist.
You should either use normal quotes (shift + 2) – or – put a backslash before each space, like this:
chmod /Users/xu/Library/Application\ Support/….
it helps!! Thank you so much! I’m sure you will fix this bug in the next upgrade:)
Glad we sorted it out, but this bug seems to be specific to your installation – in the plugin itself, the permissions are set correctly (checked this on different platforms).
drop-empty-elements: no
Hi
Use:
drop-empty-elements=no
See: https://github.com/w3c/tidy-html5/issues/36
Cheers,
Brandon
*FIGURED OUT A BUG CAUSE!*
I was using “Minify CSS” on my site and my CSS3 animations stopped working in Firefox. I discovered the reason: Minifying using your plugin is adding quotes around the “animation name” property. This causes the animation to break (at least in FF 17.0.1 on my Mac).
Thanks for a GREAT plugin!
I see – yes, firefox doesn’t like the quotes (all other browsers work correctly with or without quotes).
There’s already a patch for CSSMinify – it will be fixed in the next version.
This is an awesome plugin. Thanks for your hard work.
This is so awesome. I would not be able to work without it. Another thing I would not be able to work with out is SASS. I cleaned my SASS with the CSS tidyer. It broke it.
Are there any plans for a SASS tidyier? Is that a bug that the CSS tidyer can even touch my SASS code?
-Josh
Hi –
well the CSS tidy tool is only useful for (pure) CSS code – so it’s not a bug in that sense. The CSS tidy should only be used for CSS code, not SASS or LESS.
Currently I don’t know if a SASS (or LESS) tidy tool even exists. If so – and if it’s open source and written in a language I can integrate – I can have a look.
I thought the Coda 1.6 version did a ‘pack’ as well as ‘minify’ for js. Any plans on implementing that?
JS minify is included, but a JS packer is nothing I plan to include. Because IMHO packing isn’t helpful – it just obfuscates JS code, makes it nearly impossible to debug and slower on the client side since it must be rebuild using “eval”.
That’s exactly the point. I pack the code before delivery to help protect it. L=:)
Yes, but as you might now this protection is extremely easy to circumenvent, that’s why I don’t see much use in packing.
Hi!
It seems that the “Notify with Growl” option gets unchecked sometimes, don’t know if this is related to restarting Coda 2 or restarting Growl or what.
Using latest Coda 2 version, OSX 10.8 and the latest version of Growl from the Mac App Store.
Hi-
that happens if the plugin thinks Growl is not installed, which happens with the paid versions from the App Store (I don’t use them and have no way of tracking if they are installed..)
I wish I found this earlier! Would have saved me hours of making sure I closed all of my tags and other menial work.
Any way to set Tidy Js to use 3 spaces for tabs instead of 4?
Found it in
~/Library>Application Support>Coda 2>Plug-ins>PhpPlugin.codaplugin>Contents>Resources>jsbeautifier.php line 46
Yes, that is not optimal of course, but setting spaces correctly in all cases is on my to do list.
Would be good to get an option for HTML tidy to convert spaces to tabs post tidying, too.
Hi –
that’s unfortunately not possible with HTML tidy. From their documentation “Tidy never outputs tabs.” ;(
mario
Hi Mario,
Yes, but you can add your own option and once HTML Tidy has processed, convert the spaces into tabs.
I’ve seen implementation like this in other places :)
Aaron
Well the problem here is that I could only globally replace x spaces with a tab – so if you have for example a php-string with spaces that would also be a string with tabs afterwards, which isn’t what you want usually. Tidy is smarter and only looks at the whitespace outside of html- and php-tags and doesn’t touch your php code.
I think in most of the cases the replacement would be fine – except in cases where it doesn’t and that could lead to serious problems (Let’s say you use php to write a file where spaces are necessary like CSV, EDIFACT etc.). (Of course the php-code to write text-files should be separate from the html-views, but as you might know, that’s not always the case :)
powerful tools!!!!!!!!!!!!!!!!!!!!!!!!!!great!!
Regarding wrapping links around block-level elements:
The only markup in my .php document was this:
Starting School
I ran Tidy HTML with the default settings and it returned this:
Starting School
In case the above code didn’t get entered in to this comments field correctly, here is a link to it on codepad: http://codepad.org/7ogyt8SR
Thanks!
Okay, I see – in HTML4/XHTML it’s not allowed to nest an H3-Tag inside an A-Tag, therefore HTML “corrects” this issue.
This should not be a problem im HTML5 AFAIK, but HTML Tidy currently doesn’t natively support HTML5, unfortunately.
Hi,
Is there a way to set the Tidy HTML settings so that the only thing it changes is spaces and indents to clean up the nesting?
Two examples of what it’s currently doing that I don’t want it to be able to edit:
Deleting my “i”-tags”
Changing…
...
to…
...
I’m using the default settings.
Thanks!
Hi –
To keep “i”-tags use a custom configuration and add this line:
logical-emphasis: no
I can’t reproduce the other problem. If you have an “a”-tag, some lines of text and a closing “a”-tag HTML tidy doesn’t create two “a”-tags.. Maybe there’s another structural error in the file? Just remove everything else and test it with a minimal set of tags.
Many thanks for getting back to me.
How do I post code in your comments box without it being stripped out?
I just created a new file with the simplest markup and ran HTML tidy. I can post the results of what it’s doing.
Thanks!
Use square brackets instead of “smaller than” / “larger than”..
Hi,
The Bootstrap framework uses the “i”-tag. Is there a way to update the HTML preferences so that Tidy won’t strip out them out?
Many thanks for the awesome plug-in.
Great Plugin!
Thank You!
Hey,
The plugin broke after the last update. I’m getting this error in a alert box:
NSInvalidArgumentException
Reason:
launch path not accessible
Which sucks donkey-balls, because I like this plugin. I’ve already checked for duplicates, removed and re-installed, but no dice.
Could you please enable debug mode in the plugin settings, open console and try again what causes this error. Then send me the logfile message regarding Coda PHP, via email to mario at chipwreck dot de.
Hello,
A very great plugin for a very great editor, thank you for your hard work!
I have an idea for the minify options, but don’t know if it’s possible : save a css and a min.css file when you save your css in editor. This way, we always have both files in server and local, in case of problem.
Is it possible? If yes, did you plan that?
Thx.
I’ll have a look if this is possible.UPDATE: Unfortunately that’s not possible with the current API – it provides a method to modify the file contents before publishing (that’s what I use currently), but no means of creating another file and publishing it.
Hi there!
Great plugin… is possibile to change the keyboard shortcut to perform an action?
Not really, unfortunately. I can change them but then I’ll have to compile a new version.
Hi,
HTML tidy cleans up valid HTML5:
I would like to keep and header tags inside my “a” blocks.
How can I configure it to do that?
Hi –
it seems WordPress has eaten some of your html-tags..
HTML tidy is preconfigured to keep HTML5-tags, so new tags like “header” are kept if you use the predefined configurations (like “default”). If you prefer a custom configuration, add these lines:
new-blocklevel-tags: article,aside,command,canvas,dialog,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,meter
new-inline-tags: video,audio,canvas,ruby,rt,rp,time,meter,progress,datalist,keygen,mark,output,source,wbr
Additionally there’s a new version of tidy for HTML5 being developed, which is experimental currently. I’ll check if the new tidy can be used in one of the next releases.
Thanks Mario.
Yep WP ate my code, basically I have things like [p] and [h2] tags inside the [a] to make large clickable areas. Frowned upon in the past, but allowed under HTML5.
Great plugin by the way, so thanks!
Hi,
That does not work properly, tidy removes for example the “i” tag, tried adding it to the new-blocklevel-tags: section, no success. Also with pre-configured settings like “default” the “i” tags are removed.
Example (from twitter bootstrap):
..
That’s because “i” as tag is deprecated, use “em” instead.
UPDATE: You can also use a custom configuration and add this line:
logical-emphasis: no
Hi Mario. Thanks a lot for this plugin, it’s really great. However, as some people points out, Bootstrap uses “i”-tags which are removed when using HTML Tidy. I see that you’re saying that one can add “logical-emphasis: no” but this is simply not working. I’ve tried to add it to multiple sections of the custom configuration but nothing happens.
Should this work?
// config file for Coda PHP Toolkit Tidy FORMAT script
// http://www.chipwreck.de/blog/software/coda-php
//
// documentation is here: http://tidy.sourceforge.net/#docs
// rev 5
anchor-as-name: no
doctype: auto
drop-empty-paras: no
fix-uri: no
literal-attributes: yes
merge-divs: no
merge-spans: no
numeric-entities: no
preserve-entities: yes
quote-ampersand: no
quote-marks: no
show-body-only: no
indent: auto
indent-spaces: 4
tab-size: 4
wrap: 0
wrap-asp: no
wrap-jste: no
wrap-php: no
wrap-sections: no
tidy-mark: no
logical-emphasis: no
new-blocklevel-tags: article,aside,command,canvas,dialog,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,meter
new-inline-tags: video,audio,canvas,ruby,rt,rp,time,meter,progress,datalist,keygen,mark,output,source,wbr
// Change these only if you need to debug a problem with Tidy
force-output: yes
quiet: yes
show-warnings: yes
Yes that works here without problems – the i-tags are not being removed (if the document structure itself is valid)