formatting html attributes in vim - vim

Is it possible with vim/plugin to format/beautify html code, breaking the attributes into separate lines automatically, like:
<input
class="my-class"
attibute-1="value 1"
attibute-2="value 2"
/>

Related

Display html code in browser in liferay search container

I am using liferay search container to display tables data. In one of the field, I need to display the HTML code as given. My question is How to Display html code in browser. My code is as follows.
<liferay-ui:search-container-column-text property="question" name="Question" />
You could do something like this:
<liferay-ui:search-container-column-text name="Question" >
<div class="question"><%= nameOfTheObjectInCollection.getQuestion() %></div>
</liferay-ui:search-container-column-text>

Sublime snippet not scoping to HTML

I have the following snippet:
<snippet>
<content><![CDATA[
<label for="my-id">Name:</label>
<input type="text" id="my-name" name="my-name" value="enter your name" />
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>htmlLabel</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.html</scope>
<description>Html Label and input</description>
</snippet>
It should be scoped to HTML. It's not there when I'm in C# or Plain Text but is IS there in Markdown.
There are two ways you can fix this issue:
Change your scope to text.html.basic
Change your scope to text.html -text.html.markdown
Markdown is just a shorthand syntax for HTML. The scope for markdown is actually just text.html.markdown. You have text.html specified as your scope, so all the children of text.html are going to have access to the snippet as well.
If you want to specify a snippet for only plain HTML, you have to specify that you only want text.html.basic (the first method I showed), or you can negate certain scopes by using the - symbol (the second method I showed).
Here is a good resource where you can see all of the different types of scope for Sublime.

Lotus Web issue with browser

I have been using display.none, for the hid-whens for example, all the hidden fields were kept in a section and section was hidden from web by using Display.none.
This is working for Internet Explorer till IE 9, but for IE 10 all the hidden fields are shown.
Can anyone help in this matter. Any alternative or approach.
Without seeing the page it sis very difficult to guess.
Try validating the html through one of the many online html validators as something may not be closed or Notes might have given you an unwanted code addition .
Try adding a background color to the css #wrapper to make sure the css is being called.
Take a copy of the form and start removing all other elements one section at a time to see if something else is causing the issue.
Add {meta http-equiv="X-UA-Compatible" content="IE=10;IE=9; IE=8; IE=7; IE=EDGE" /} as the very top meta tag and see if that fixes it. Replace the curly braces obviously.
All the best in finding the issue.
It sounds like just the section element is getting hidden. Without seeing the code I can't tell why that changes between ie 9 and 10 but ie is famous for having varying behavior between versions.
One alternative that comes to mind: You could wrap the section and the fields in a DIV element using pass thru HTML and set that div's style to display:none. That is pretty standard and should work across browsers.
Update: To give you an idea what I'm talking about, check out this jsfiddle.
HTML:
<form>
<div class="wrapper">
<input type="text" name="Field 1" /><br />
<input type="text" name="Field 2" /><br />
<input type="text" name="Field 3" />
</div>
<span>Some text that won't be hidden.</span>
</form>
CSS:
.wrapper {
#display:none;
}
You can remove the # next to the display:none and see the difference, even in IE 10.
You'll need to look closely at the HTML being rendered by Domino and make sure that in fact all the fields you are trying to hide are surrounded by the DIV that is hidden.

Group of radio buttons in different location

I am developing a JSF page where I have to place two radio buttons in different locations. First one will have two calendar components, and the next one will have an input text.
The components will be as follows (All components in a single row).
The problem is that the 2 radio buttons are not near each other but having components in between(if they were near each other I could use h:selectOneRadio).
Is there any way to achieve this in JSF or Richfaces?
Any suggestion is appreciated!!!
You could use CSS and position the buttons where they need to be, but if you need to style each one individually that's not going to work.
Or you can use basic radio buttons with <a4j:jsFunction>, something like this:
<input type="radio" onclick="changeValue(1)">
<calendar> …
<input type="radio" onclick="changeValue(2)">
<h:input… >
<a4j:jsFunction name="changeValue" >
<a4j:param assignTo="#{bean.value}" name="value" />
</a4j:jsFunction>

asp text commands to modify text on buttons, labels, or textboxes

I have no idea what this is called, but when you have Text = "TEXT TEXT <br /> TEXT TEXT"
where can I find a list of the "<br />" type of modification symbols?
Sorry for the dumb question, just don't know what this is called.
I think that what you are after is HTML encoding which will convert such string:
TEXT TEXT <br /> TEXT TEXT
To this:
TEXT TEXT <br /> TEXT TEXT
To achieve this, classic ASP has built in method called Server.HTMLEncode which is explained in detail here.
Real use example:
<%
strRawData = "TEXT TEXT <br /> TEXT TEXT"
strEncoded = Server.HTMLEncode(strRawData)
%>
You are using break command.Instead br/ you can use only br (inside <> as a tag) for line break. There are more commands in vbscript which can be used in classic asp. Go To this link

Resources