-
Notifications
You must be signed in to change notification settings - Fork 3
Editing HTML by hand
Also see the wiki page here on "Importing."
If you create or edit an HTML file "by hand" then there are some things to be aware of if you import the file into this project.
New controls added in HTML
A control added to HTML without a unique id attribute and without a corresponding definition in a CSS file will get created in the LC card on import, but it will be placed near the top-left corner of the card and will get the properties of the active LC template for that type of LC control.
A common situation in which this might occur would be a plain paragraph tag added by hand to the HTML file.
Such a paragraph will become a small locked field on import. Subsequently, on export, this paragraph will acquire an id attribute and a definition in the exported CSS file, which would define it to have a fixed, small size, rather than a paragraph with an unrestricted output area. This can be corrected in the HTML file by hand by deleting the id attribute of the paragraph.
HTML above BODY tag
All text above the body tag in an HTML file will be preserved on import and subsequent export. After import and during editing in this project, this text is preserved in a custom property of the LC card, cHeaderData.
Comments
The specific location of comments will not be preserved but the collected comments will be preserved. Comments added to the body of an HTML file will be collected on import and added below the saved header text in the LC card's custom property cHeaderData. These comments will be exported in this manner to appear above the body tag in the exported HTML file. Thus, their original position in the HTML file will be lost.
Javascript
Other than calls to functions in control tags, Javascript code should appear only in .JS files linked to the HTML file in the HTML file header. Calls to functions added to tags of controls will be preserved on import and export. In the LC card, these calls are preserved in a custom property of the corresponding LC control.
HTML element attributes
When editing an HTML file for import, you must use quotes (attrib="400") and not apostrophes (attrib='400') nor neither (attrib=400) nor spaces (attrib = "400") for import by this project - see function fGetHtmlAttribute in IMPORT script stack