Adding whitespace to web page source so that I can read it - whitespace

I'm curious about the web page I'm viewing.
I use the "view--page source" and get a window with the html.
I cut and paste this into notepad++.
I manually parse through adding whitespace to make it readable to me.
Is there a better way to do the last step? I'm hoping something has been written which automates this process, giving the user a readable version of the source file.
Thanks for any help.
-bill

Try HTML Tidy
Numerous editors have support for HTML Tidy (if you use an editor that knows about HTML, check the menus or documentation); alternatively, you can run HTML Tidy from the command line.

There is HtmlTidy, which works in Notepad++
http://tidy.sourceforge.net

Related

Tiny MCE v2.1 code editor

Call me old fashioned, but there is nothing I can do but only to use the old version of Tiny MCE, which is 2.1.
So, what I'm trying to do is to add a "download" attribute to tag, after I open HTML editor I type this attribute, when saving it simply disappears. There is no official documentation to this old version on the official site. The new ones doesn't mention anything about this feature at all. overall editor look. code editor look
Also, I tried to add "download" in the extended valid elements configuration:
extended_valid_elements: "code[class|dir ,however no success as well.
Did anyone by any chance faced the same problem?
Could use a little bit of help.
Well, if anyone ever encounters the same problem, which I highly doubt, you would need to open tiny_mce.js file, and on the line 1928 there will be "A : "id|class|style|title|download" ", this is the place, where I added "download". Afterwards I was able to add this attribute in the HTML code editor.

CKEditor - have it return markdown syntax instead of HTML

I'm working on a CMS platform and I am planning to use CKEditor as it seems to offer everything I need.
One thing that is a bit of a bother to me is that I want my content to be in markdown format instead of html and while I found a BBCode extension for this, I couldn't figure out how it can be remade to support markdown.
I tried to find an editor that does markdown out of the box, but the ones I found are way too simple for what I need and CKEditor has the benefit of having a plugin system to adjust perfectly for me.
CKEditor now has a Markdown addon that does this exact thing. The addon project is hosted on github.
Screenshots:
See also: Integrated Markdown WYSIWYG text editor (2012)
Using Markdown instead of HTML is a very bad idea for several reasons:
Markdown has no spec, so every library works differently in details. The output which you'll produce using CKEditor may give a different (even totally wrong) result when transformed to HTML by your back-end. For example - escaping image's title and link texts - you won't be able to ensure that the text user inserted does not break the output.
Not all HTML can be transformed to Markdown.
There are plenty of tricky cases which are totally correct in HTML, but cannot be done in Markdown.
Markdown has fewer features than HTML, so you'd lose some content which users produced.
You actually gain nothing by using Markdown instead of HTML.
I am a CKEditor core developer, so I know it very well. I tried to implement a Markdown writer for CKEditor and very quickly I found that it's completely pointless. I don't say that it's not possible, because it is, but only a limited stability can be achieved - too low for anything I would personally want to use in production.

Is there support for XML code hinting / completion in Sublime Text 2?

I am giving Sublime Text 2 a try and I was editing an XML file - that had a DOCTYPE declaration and a DTD - and there seems to be no way to get code hinting / completion when editing the XML document.
I am sure its something simple I am overlooking. I cannot imagine Sublime does not have this kind of functionality, even if provided via a plugin.
Can someone shed some light on this for me?
Sublime Text is first and foremost a text editor.
But, the reason for it's popularity is in large part due to it's extensibility.
Although you could use Sublime's api to create a specific plug-in to do this, Sublime has a few tools that are already helpful in editing xml files and other markup files on a bare install.
Hinting and completions in particular are very easy to add. It shouldn't take a more than few minutes to create a domain specific sublime-completions file for your particular xml.
You can use alt+shift+w to create an xml element, in addition alt+. will close any un-closed xml element.
You may also want to try the Sublime Tag plug-in available through Package Control
Lastly you could also bring this up in the Sublime forums as a plug-in request. There are a lot of helpful folks in the plug-in community.
You can use the 'tag' plugin from Sublime Package Control. It has auto tag closing, linting and other features. The github page for the project is here: https://github.com/SublimeText/Tag
You can install it using Package Control without leaving your Sublime text editor.

How to insert HTML/javascript/css code in joomla article

I am using Joomla 1.5. and I am writing a blog in joomla and want to highlight some HTML and javascript code but when I save that article after inserting the HTML code as it is, it gets exicuted itself. I also tried it with codecitation plugin but no result. If you people have any solution then please reply.
Use a <pre> tag it should work.
e.g.
<pre><html><\html></pre>
In your blog try "& lt;" (without space) to write < and "& gt;" (without space) to write > in your HTML Code.
This syntax is used to write "<" and ">" symbols on some web page. Otherwise it will treat your code as part of the blog article and will show its output.
You can use <pre> and <code> tags.
Also Joomla has a native plugin to display code and syntax highlighting, based on the Geshi project.
It's easy to use, just be sure it is enabled in your plugins config:
<pre lang="html" >
<p> some text </p>
</pre >
Hope it helps!
Use the a jQuery highlighter.
Sorry for coming late to the party.
I used an extension called Easy Script. Just download, install and paste your script in your article manager and Boom. It even supports Bootstraps and other scripts as well.. Just give is a trial
Easy Script

Markdown syntax highlighting in SciTE/Notepad++

I'm looking for a .properties file for Markdown syntax in SciTE. Is it possible?
A partial highlighter would do, otherwise.
I'm using this syntax file: https://github.com/leafnode/markdown_npp with some color changes to fit dark background.
I've uploaded my (dark) user-defined language Markdown highlighter on GitHub. It uses different workarounds than thomsmits', which for the style of Markdown I've chosen work better.
Until the Markdown Scintilla lexer is imported into Notepad++, user defined languages are the best we can do.
I don't use Notepad++ any more and have deleted my project. Try Brettz9's fork of the project here: https://github.com/brettz9/Notepad---Markdown-Highlighting
I'm using Markdown-plus-plus. The install instruction is outdated on many projects. The actual instruction is:
Select menu "Language" → "Define your language..."
Press button "Import...", and select {markdown}.xml (from GitHub repositories).
Restart Notepad++
I believe somebody mentioned on the mailing list that he is working on such a lexer.
I don't think a simple .properties file can do the job, as there isn't any existing lexer (to my knowledge) with similar syntax.

Resources