Fields/Custom Tags Supported?

  • Hello,

    I am evaluating TextDynamic .NET ("TDN") for use in my commercial application. It needs to have markers/fields/tags embedded in the text of this control, and, ideally, the users cannot edit these embedded markers/fields/tags. The idea is that these markers/fields/tags will be merged with data in another application that takes output from TDN and customizes it. For example, a marker/field/tag could be [[CUSTOMER_NAME]], which would be inserted into the TDN control. Hopefully, the user cannot edit this marker/field/tag, except to insert or remove it from the TDN control. Does TDN support this functionality? Currently, I simply insert textual tags, like in my example, but it would be nice to have a true marker/field/tag.

    Thanks for any and all comments and ideas...

    Mike

    • Offizieller Beitrag

    Hi,

    The engine supports different kind of fields in RTF (mergefields, bookmarks, text objects)

    In HTML (I read your other post) it is more difficult. It is possible to embed custom HTML code into the text by inserting a special text object with the name HTMLCODE and the html text in the code property.

    Such tags can be inserted with the method
    TextCursor.InputFieldObject("HTMLCODE", "</mytag>", "")
    Also see: http://www.wpcubed.com/manuals/tdref/…FieldObject.htm

    If you also need to read tags from HTML please let me know about the specs.

    Julian

  • Hi Julian!

    Thank you for the quick responses! I have had a chance to learn more about this control since I posted my two queries... What I am thinking about doing is using RTF as my storable format and for user editing. It would permit me to use your fields, provides great copy-n-paste functionality, and provides a lot of editing power. I am experimenting with using your control to generate HTML, which I can modify to use src=cid format. I need to study your docs a little more to see how you handle images, and how to keep track of them when they are inserted/deleted and copy/pasted...

    EML is an interesting idea, but Microsoft has put a few strangle holds on its use...

    On a related note to this particular topic, can I make a field not editable by the user? I saw a protection attribute, but couldn't make it work...

    Thank you for all the help!

    Mike

    • Offizieller Beitrag

    Hi,

    When I said EML I meant the standard multipart MIME format. I don't think it is protected in any ways - is it?

    You can protected certain elements of the text by setting a flag using

    Memo.SetBProp, group 3=wpProtectProp
    http://www.wpcubed.com/manuals/tdref/…mo_SetBProp.htm

    SetBProp(BPropSel.wpProtectProp, 9, 1) would set the ppIsTextObject flag
    The user can still select text which contain a text object and delete it. To also disable this also use

    SetBProp(BPropSel.wpProtectProp, 14, 1) // ppProtectSelectedTextToo

    Julian