Arbortext Command Language > Functions by Alphabetical Listing > oid_paste_valid
  
oid_paste_valid
oid_paste_valid (oid[, pos[, pastedoc]])
This function determines if it is valid to paste the contents of the paste buffer at the document location specified by oid, pos. If pos is omitted or 0, the location to the right of the start tag identified by oid is used. The pastedoc argument specifies the document identifier of the paste buffer to test. If 0 or omitted, the default paste buffer is used.
oid_paste_valid returns one of the following integers:
2 — Paste is valid after fix ups, for example, adding required tags.
1 — Paste is valid.
0 — Paste is invalid. For example, the destination is protected, the region to paste is unbalanced, or context errors would result.
-1 — Paste may be valid, but involves pasting tags from a different document type, or the paste buffer is the default paste buffer and the system currently owns the clipboard.
Note, oid_paste_valid does not check if it is valid to paste tags from a different document type, for example, where the structures are same.
Related Topics
cut_valid function
delete_markup_valid function
oid_expose function
oid_show_attr function