Command WR INSERT STYLED TEXT

4D Write

WR INSERT STYLED TEXT

version 6.5


WR INSERT STYLED TEXT (area; blob)

ParameterTypeDescription
areaLongint4D Write area
blobBLOBVariable or field

Description

The WR INSERT STYLED TEXT command inserts into the 4D Write area referenced by area the contents of blob. The insertion will either take place at the cursor location or it will replace the current selection. blob can either be a BLOB field or a BLOB variable. It is, however, mandatory that blob was initially created using the WR Get styled text command.

The internal format used to represent the styled text in blob is platform independent. It can be created using a Mac OS computer and be inserted later into a Windows document, or vice versa.

blob contains a selection of 4D Write text with all its text attributes (color, style...) except for style sheets, as well as its paragraph attributes (margins, tab stops, formats...).

Example

You want to store in the table [Letters] the most frequently used templates of your business letters, while still saving hard disk space. To do this, you create in the table a BLOB field called 'Templates'. In the input form for that table, you insert a 4D Write area called 'Area'. Finally, you attach the following method to the form:

   Case of 
      : (Form event=On Load)
         If (Record number([Letters])#-3)
            WR INSERT STYLED TEXT(Area;[Letters]Templates)
         End if 
      : (Form event=On Data Change)
         WR EXECUTE COMMAND(Area;wr cmd select all)
         [Letters]Templates:=WR Get styled text(Area)
   End case 

See Also

WR Get styled text, WR INSERT TEXT.