I think HTML Autocomplete is supposed to be built into VSCode, but when I type for example <p> and ctrl space there are no relevant html autocomplete options. How do we get these?
I think another plugin may be overriding the built in intellisense. How would I trouble shoot that?
VS Code's built-in html intellisense only suggests tags when it looks like you are in tag (such after a < to open or close the tag)
When you are in a text context, such as inside the tag body, we will not suggest tags. However Emmet is still enabled inside of tag bodies.
But it only suggest closing tag if u want to read documentation then
read more about vs code documentation
If u inside the body tag u will not suggest tag because Emmet abbreviations is enabled read Emmet abbreviation documentation
Related
I am new to VS Code and using it for Html editing. Is there a way to have the IDE show me a list of the attributes available for an Html tag? I do get Intellisense when I am typing a tag name and it will auto-close the tag, but there doesn't seem to be support for displaying the attributes specific to the tag. I can use Ctrl-Space to display a universe of attributes, but I'm looking for a list of the attributes from the official Html reference. Or maybe a tag-level help pane where it would display the tag information, including purpose, usage, attributes, etc.
Without installing an extension, I am getting a list of attributes when I press Ctrl+Space while inside an open tag like this <p.
There must be a space after the <p, so the tag name must be complete and the cursor separated from it by a space. If the cursor is still on the tag name, VSCode tries to autocomplete the tag name when pressing Ctrl+Space.
In VS Code it is showing attributes available in an HTML tag but it fails when showing/suggesting values for a specific tag. For that purpose, I am using this extension called "HTML CSS Support" by ecmel. But for the scenario mentioned in this question, You can get it done with #C14L 's answer. There may be other good extensions but this is the one I have tried and it works perfectly.
Currently, I am working on a program that converts an html page into a PDF using the iText Library.
The Checker that I am using is PAC3 -->PDF Accessibility Checker 3 which is described by the following link (https://section508.gov/blog/check-pdf).
One of the issues is the “Alternate description missing for an Annotation”
An excerpt from the following link explains it:
http://www.uottawa.ca/respect/sites/www.uottawa.ca.respect/files/fss-fixing-accessibility-errors-in-pdfs.pdf
Alternative description missing for an annotation This usually happens when the link is not clear enough. To fix this error, add alternative text to the link tags. To add the alternative text, please do the following;
In the tag tree, select the tag for the link, and select Properties
from the options menu.
In the Touchup Properties dialog box, select
the Tag Tab.
Type alternate text for the link, and click close
I have been trying to use iText to fix this problem, but googling, looking at the source and reading the documentation does not help.
Does anybody have any suggestions on how to either write the HTML or use the itext problem to get rid of the “Alternate description missing for an Annotation”
Thank you for your help
You did not specify whether you using old code (XMLWorker, HTMLWorker) or new iText code (pdfHTML).
This of course impacts the proposed solution.
In my answer I am going to assume you are using pdfHTML
There are several options:
edit the incoming HTML using a library like JSoup
convert the incoming HTML to iText IElement objects, and edit those, setting properties where needed
write your own custom TagWorker that handles all instances of a specific tag, and write custom logic to deal with the missing annotations.
An example of a custom tag worker can be found here:
https://developers.itextpdf.com/content/itext-7-examples/converting-html-pdf/pdfhtml-custom-tagworker-example
I would like to use custom tags in my html files to include custom knockout components [1]:
<like-widget params="value: userRating"></like-widget>
I added the tag to the VisualStudio html formatting settings:
Tools > Options > Text Editor > HTML (Web Forms) > Formatting > Tag
Specific Options
Resharper still does not recognize the custom tag and gives the warning
Cannot resolve tag "like-widget"
How do I tell Resharper to allow that specific tag without disabling the unknown tag warning? Is there some sort of setting file where I can register custom html tags?
Related article:
How to add custom HTML Tags to Visual Studio and Avoid Squiggly Lines
It is not possible right now - there is a related ticket https://youtrack.jetbrains.com/issue/RSRP-434190.
I would suggest to Disable the Inspection for Unknown HTML Tags as I indicated here:
Can I stop ReSharper objecting to Ionic HTML tags?
I am using PHPStorm IDE and in the meanwhile I also use HTML comments for the ending tags.
I use Reformat Code by cmd+alt+L keys a lot. I am aware that the Code Style in Preference will change the code style when using Reformat Code. However, it seems that I cannot change the HTML comments which are in the same line as HTML ending tags from going to the next line when I use Reformat Code feature which is annoying.
How can I change that to have the HTML comments inline with HTML ending tags when using Reformat Code feature?
AFAIK there is no such option.
https://youtrack.jetbrains.com/issue/WEB-5070 -- star/vote/comment to get notified on progress.
In a regular select box you can show the full title on mouseover using "title" attribute in the "option" field.
In Apache Struts, you make the select box with the "html:options" tag. I don't think this tag supports the "title" attribute. Is there another way to show the full title of an option on mouseover for the "html:options" struts tag?
Thanks
Struts' tag for <select><option>.. is <s:select />, or <s:doubleselect /> for double lists. <s:doubleselect /> doesn't support title at all, you have to modify the Javascript it generates by hand (ddoubleselect.ftl).
For with the default theme, the file is found in struts2-core-2.1.6.jar under template/simple/.
hard code in html or jsp file is a bad code practice.
if you are writing code in struts 1.x try to store all messages in MessageResources_en.properties
try update your jsp with following (alternatively go for )
title="<bean:message key="your_tool_tip"/>
and modify MessageResources_en.properties
your_tool_tip=toolTIp is a cool idea
ps there are solutions available in jquery as well
I'll admit to not being familiar with Apache Struts. If nobody more familiar can find you a better solution then worst case you could do it as a javascript tooltip. It's more effort, but gives you more effective visual control over the presentation.