Registration of the code without "Escaping" of critical characters via an ASCII text field of a special objects.
Programming code shall be displayed in a special text element; since simple HTML/CSS formatting is not sufficient to display HTML/code elements/entities it is fallen back on ZOPE rendering with correspondent attributes of the var-tag.
Creator: F. Hoffmann; 2003/07/07 , Version: 0.2
Download-File:
codeeditor.metaobj_ger.xml
(8KB)
Installation: Import into the configuration for special objects.
Registration of the code without "Escaping" of critical characters via an ASCII text field of a special objects.
Render result of the code: all registered characters are displayed correctly and not rendered dynamically.
View of the object definition; the special object consists of the element 'text' and presentation methods which ensure with the function <dtml-var "getObjAttrValue(getObjAttr('text'),REQUEST)" html_quote> that DTML code will not be rendered. The code is bordered with the HTML tag <pre>; by this all line breaks and blanks are rendered just like they were entered. The var attribute "html_quote" ensures that the output of HTML entities is correct.
Note: Find more about the var attributes resp. the output of line breaks (newline_to_br), URLs (url_quote) etc. here: DTML Reference
Registration of the code without "Escaping" of critical characters via an ASCII text field of a special objects.
Render result of the code: all registered characters are displayed correctly and not rendered dynamically.
View of the object definition; the special object consists of the element 'text' and presentation methods which ensure with the function <dtml-var "getObjAttrValue(getObjAttr('text'),REQUEST)" html_quote> that DTML code will not be rendered. The code is bordered with the HTML tag <pre>; by this all line breaks and blanks are rendered just like they were entered. The var attribute "html_quote" ensures that the output of HTML entities is correct.
Note: Find more about the var attributes resp. the output of line breaks (newline_to_br), URLs (url_quote) etc. here: DTML Reference