Skip to main content

How do I use XHTML to format text in Lasernet? - Knowledgebase / Lasernet / Lasernet FAQs - Formpipe Support Portal

How do I use XHTML to format text in Lasernet?

Authors list


This article will explain how to use XHTML as a method of formatting text within rearranges. Whilst version 8 of Lasernet included a new feature called “Styles” for formatting the text within re-arranges, XHTML can still be used alongside or as an alternative option. Using Styles is recommended from Version 8 and above due to the ease of use and flexibility to apply a style globally.

HTML (HyperText Markup Language) and XHTML (Extensible HyperText Markup Language) are both languages that can be used to write web pages. XHTML follows XML standards meaning that it is stricter than normal HTML. Both can be applied in the scenarios below:

Below shows a selection of supported HTML tags and the output

<p>A paragraph</p>

<p> A second paragraph</p>

<strong>Strong</strong>

<em>Italic</em>

<u>Underline</u>

<span style=”text-decoration:underline”>CSS style underline</span></br>

<span style=”font-size:12pt;color:red”>CSS style large red</span></br>

<ul><li>list item one</li>

<li>list item two</li></ul>

<ul style=”margin:0”><li style=”padding-left:11px”>list item one</li>

<li>list item two</li></ul>




XHTML setup within Rearranges

Prerequisites:

  • The Form editor is set up with a text grab file.
  • At least one created Rearrange.

This section will outline how to turn on XHTML and use it to format the text within Rearranges. Please follow these steps:

1. Double-click on a Rearrange to bring up its settings or right-click and select General.



2. Select the XHTML checkbox.


3.  Click the Objects tab,  and select the Add button to add a Fixed text element to the list.

4.  Move it above the rearrange element, add another, and ensure it is below the rearrange.

5.  The Fixed text will be used as starting and end tags to apply the HTML formatting to the rearrange. For this example, we will make the rearrange italic. 

6.  At the top Fixed text box enter the following opening tags “<em>” and then in the bottom, Fixed text add “</em>”. 

This is the formatting result after applying the ’em’ tag to the text. It is now Italic.

     


We are essentially wrapping the data with the XHTML formatting which Lasernet will process.

 

Fixed text formatting

XHTML can also be used on a Fixed text element, but it has the advantage of being able to format the text as well.

1. Create a Fixed text box using the Text tool and then go to the properties

2. In the General tab select the XHTML checkbox.

In the example below XHTML has been written in the text box that formats the text according to the tags and styles applied:



Using multiple rearranges

The XHTML option disables ‘Newline’ in the Input tab and removes line breaks from the captured value when active.

A break can be placed between Rearranges by inserting a Fixed text with a value of “<br>”.
For example:


Ensure the XHTML option is selected within the General tab.

Helpful Unhelpful

0 of 1 people found this page helpful

Add a comment

Please log in or register to submit a comment.

Need a password reminder?

Share