Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Paul is right, this is exactly how we implemented the same change you're looking for, automatically inserting <alt> within <image> you need to create a custom acl function that uses the insert_tag_after callback. The function should test if you're inside an image tag, insert the alt tag, then move the cusor back to within the image tag to then insert the title tag.
Add this in functionto a .acl file in the custom\init folder.
In Reply to Paul Nagai:
Hi Roopesh,
You should look into callbacks generally and the insert_tag_after callback
specifically. This callback will let you test an inserted tag and if it is
found to be a table, you can insert the title. This should not cause
performance issues.
On Wed, May 28, 2014 at 7:36 AM, Roopesh Navath
wrote:
> Hi,
>
>
>
> Thank you for the quick reply.
>
>
>
> I will tell my requirement.
>
>
>
> 1. As per requirement from client, I made optional *alt* tag in
> *image* and *title* tag in *table* made required(mandatory) in main DTD.
> The problem is the existing publications(topics) in repository getting fail
> which do not have title in table and alt tag in image.
>
> 2. Customer want to add some tags by default in Arbortext editor to
> reduce writers effort by adding tags manually. So I am trying to make these
> changes only for arbortext editor.
>
>
>
> Can you suggest any idea how to resolve without failing existing
> publication?
>
>
>
> Thanks and regards
>
> Roopesh N
>
>
>
> *From:* Lynn Hales [mailto:-]
> *Sent:* Wednesday, May 28, 2014 7:56 PM
>
> *To:* -
> *Subject:* [adepters] - RE: inserting tags with in another tags by
> default/arbortext-Editor
>
>
>
> Roopesh,
>
>
>
> No, inserting optional tags can be counterproductive. If you do not want
> it, then you must remove it.
>
>
>
> If you feel you need the tag all the time then consider changing the
> DTD/Schema to make it required.
>
>
>
> Epic is reading the DTD/schema and has no way of knowing what your
> individual requirements are.
>
>
>
> All that aside, you could write an ACL or similar script to insert
> specific tags at a given time. HOWEVER, this would require the script to be
> running continuously and could easily slow your authoring process down as
> it will be a system resource hog.
>
>
>
> One last option is you might be able (and I do not use this feature so I
> am purely guessing), is make an 'alias' tag that has the elements you want
> as required and then possibly the 'set addrequiredtags' would insert the
> elements you want.
>
>
>
>
>
> Lynn
>
>
>
> *From:* Roopesh Navath [
>
> *Sent:* Wednesday, May 28, 2014 9:53 AM
> *To:* -
> *Subject:* [adepters] - RE: inserting tags with in another tags by
> default/arbortext-Editor
>
>
>
> Hi Developers,
>
>
>
> Thanks you for the mail.
>
>
>
> So only required tag can insert by default. I am looking if there any
> option to insert optional tag by default by changing any arbortext files
> and Without editing original DTD.
>
>
>
> Thanks,
>
>
>
> Roopesh
>
> *From:* Lynn Hales [
>
> *Sent:* Wednesday, May 28, 2014 7:14 PM
> *To:* -
> *Subject:* [adepters] - RE: inserting tags with in another tags by
> default/arbortext-Editor
>
>
>
> Roopesh,
>
>
>
> Yes it is, at least to a degree. In your 'set commands' there is an option
> called 'set addrequiredtags' (help 9181) that will provide pretty much what
> you want.
>
> There are some limits, only 'required' tags are inserted and only if the
> insertion will not cause parsing errors.
>
>
>
> Go to the menu select 'tools|preferences' then click on the 'edit'
> category and check the box to 'insert required elements' then click OK.
>
>
>
> Lynn
>
>
>
> *From:* Roopesh Navath [
>
> *Sent:* Wednesday, May 28, 2014 5:59 AM
> *To:* -
> *Subject:* [adepters] - inserting tags with in another tags by
> default/arbortext-Editor
>
>
>
>
>
> Hi developers,
>
>
>
> I want to insert some tags with in other tags by default in Arbortext
> Editor. Ex: when I insert Table tag , title should insert by default
> without changing optional to required in DTD. Is it possible with DCF
> files or FOSI files?
>
>
>
>
>
> Regards,
>
> Roopesh Navath
>
>
>
>
>