-
January 12th, 2021, 18:56 #1
Script add to Description Linklist?
Hey guys. Small question. I'm working on an extension that generates a list of spells from your campaign. I want to take that list of generated shortcuts/links and have it automatically added to an "Item" in the description field of the item. Is there a function I can call upon to do this already? Getting the path of the "description" fields "linklist" and adding nodes or creating windows in it doesn't appear to be working out for me. There must be an "addLink()" function or something for formattedtext fields, no?
thanks for any help, in advanced!
-
January 12th, 2021, 19:05 #2
As formattedtext controls can have all sorts of markup and formatting, there is no API calls available to do what you want. All you can do is get the current value, modify that with the FG formattedtext markup as required, and then setValue with the modified data. This is only possible when using a formattedtextfield (not the base control which isn't tied to a database field) as getValue and setValue is only possible against the database node the control is tied to.
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
January 12th, 2021, 19:15 #3
ok. so, could this be edited via script then? much like how one could put a <p> to create a new paragraph?
Code:<text type="formattedtext"> <p>Pugilists in the Arena Royale fight club travel the world earning their keep as equal parts performer and gladiator. Whether performing in staged physical competitions, or fighting it out in unscripted brawls, pugilists in the Arena Royale care as much about the theatrics of a fight as they do its outcome. Pugilists in this fight club also care deeply about their reputation and work to build up local and regional legends about their performing personas.</p> <p /> <linklist> <link class="reference_classfeature" recordname="class.id-00002.features.id-00021">Bonus Proficiency</link> </linklist>
</linklist>” and set the value.Last edited by pr6i6e6st; January 12th, 2021 at 19:33.
-
January 12th, 2021, 20:01 #4
Last edited by Trenloe; January 12th, 2021 at 22:17.
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
January 12th, 2021, 20:48 #5
got it! beautiful! thank you again Trenloe!
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks