VS2015 html editor adding blank space after and before tag name when i use wrap and duplicate line - visual-studio

When i use Wrap with or Duplication line, Html editor format's like this.
How to fix it?

Related

Why form class is highlighted as red?

Can somebody tell me which the cause of form class that highlighted as red? What's the meaning of this? I can't get rid of it. I already close the form at the end of the line. But when I view the page source this is what look like.
This is your editor trying to be helpful by highlighting the form tag.
As you're writing HTML make sure you're using an editor that supports more than PHP, like Atom or Sublime Text. Or tell your editor that you're editing HTML.

In ckeditor how can we avoid extra non-breaking spaces in paragraph tags?

When editing in ckeditor I very frequently end up with extra clusters of <p> </p> tags. Not only does it add extra unneeded linebreaks, they often show up on the resulting page with a broken-looking character in them.
Is there a configuration setting or something to tell the editor not to add these extra non-breaking spaces in paragraph tags?
Thanks,
doug
The paragraphs with represent empty lines in editor. They make the content look exactly the same inside editor and outside it (when displayed on a target page). If they cause you some problem, then it's not the editor, but your backend. So I rather recommend checking it.
Surprisingly though, there's an option to disable filling empty blocks config.fillEmptyBlocks.
But it's really not the answer.

Is htmlspecialchars needed for inline ckeditor?

I read the contents of a text file, use inline editor to edit then write back to same text file. Do I need to use htmlspecialchars? If I do, when? Displaying to html, writing back to the file or both?
When you output to the edit page ( the one with ckeditor ) you use both stripslashes() and htmlspecialchars().

how to disable tag validation in ckeditor?

CKeditor apparently automatically creates matching end tags when you enter a start tag. Is there a way to turn this behavior off?
I have a situation where I am creating two blocks of text in an admin program using CKeditor, then I'm using these to paint a page with the first block, some static content, and then the second block. Now I've got a case where I want to wrap the static content in a table. I was thinking, No problem, I'll just put the <table> tag in the first block and the </table> tag in the second block, and the static content will be inside the table. But no, CKeditor insists on closing the table tag in the first block.
In general, I can go to source mode and enter HTML directly, but CKeditor then decides to reformat my tagging. This seems to rather defeat the purpose of having a source mode. (I hate it when I tell the computer what I want and it tells me, No, you're wrong, I know better than you what you want!)
CKEditor produces valid HTML. Valid HTML has to include both - start and end tags. There's no way to change this behaviour without hacking editor. Note that even if you'll force editor to produce content without one of these tags it will then try to fix this and won't do this as you expect. E.g. load:
<p>foo</p></td></tr></table>
And you'll completely loose this table so only regexp based fix on data loading could help. In the opposite case:
<table><tr><td><p>foo</p>
You'll end up with paragraph wrapped with table, so it's better. But what if someone would remove this table from editor contents?
Therefore you should do this integration outside editor - prepend table to contents of one editor and append to contents of second one. You simply cannot force editor to work on partial HTML.

How can I adjust Textmate syntax highlighting in Smarty literal tags

So I have the Smarty TM bundle installed and active in Textmate, but I have a problem with the way it treats stuff inside of Smarty's literal tags.
As seen in this example: http://pastie.textmate.org/private/v3amipi5ukpg7vlcivixw
If I put Smarty literal tags inside of my HTML script tags, TM sees the stuff within the script tags as JS and highlights it appropriately. If I move those literal tags such that they are around my script, Textmate loses track of the fact that the script tags contain javascript--or even that the script tags are HTML--neither are highlighted.
I hate putting my literal tags inside the script because everything that deals with JS in the editor (for example, I have a TM command to run my JS through JSHint) gets mad at them being there unless I prefix them with JS comments (like in my pasted example). But prefixing them with comments is extra work I don't feel like doing, and causes lots of empty comments in my outputted source.
I have looked at the various lang definitions involved, and just cannot figure out what the heck to do to fix it. Any thoughts?
Thanks,
Jim

Resources