Summary
HTML Portlets can be used in man ways.
- With this Operator you can build a portlet that allows editing in BOARD and the results come back into TIS-Editor. Saves the content of an HTML portlet in the node.
- Without this operator you can display simple or complex texts in HTML Portlet (e.g., error warnings, messages, even tables -
Example: ...
Situation | ... |
---|---|
Settings | ... |
Result | ... |
Project-File | ... |
Snippet for creating tables:
Aufbau Formeloperator: Spalte HTML - Datentyp Text
/* Fester Vorspann */ (rowNumber == 0 ? ( "<tableX border='1'" + " bordercolor='#E8E8E8' cellpadding='5' cellspacing='0' width='100%'>" + /*Anpassen Spaltenzahl */ "<colgroupX> <col width='30%' align='left'> <col width='20%' align='right'>" + "<col width='20%' align='left'> <col width='30%' align='left'> </colgroupX>" + "<thead bgcolor='#C0C0C0'><tr>" + /*Anpassen Spaltenköpfe */ "<th>Name Eingabewert</th><th align='right'>Wert</th><th>Einheit</th><th>Anmerkungen </th></tr></thead>") : "") + "<trX bgcolor='#FFFFFF'>" + /* ZEILENAUFBAU */ "<trX>" + "<tdX>" + #Eingabe# + "" + "</tdX>" + "<tdX align='right'>" + #Wert# + "" + "</tdX>" + "<tdX>" + #Einheit# + "" + "</tdX>" + "<tdX>" + (XIH.IsNull("Anmerkung") || #Anmerkung# =="" ? "-" : #Anmerkung#) + "" + "</trX>" + /* ZEILENABSCHLUSS */ (rowNumber == rows-1 ? ("</tableX>") : "")
Danach mit Operator Spalteninhalt verketten die einzelnen Zeilen zu einer Zelle zusammenfassen. Am Schluss mit 2. Formeloperator Steuerungszeichen austauschen (ergebnisytp Boolean)
XIH.SetString("HTML", #HTML#.Replace("tableX", "table")) && XIH.SetString("HTML", #HTML#.Replace("trX", "tr")) && XIH.SetString("HTML", #HTML#.Replace("tdX", "td"))&& XIH.SetString("HTML", #HTML#.Replace("colgroupX", "colgroup"))
und überflüssige Spalten außer Spalte HTML löschen
Want to learn more?
Related topics
- ...