cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I modify the content of one fo my elements?

SOLVED
pzorrilla
Newbie

How do I modify the content of one fo my elements?

Hello gurus!!

So I was wondering, how can I change the content from one element, let's say a Title inside my document opened in Arbortext Editor? I'm not sure at this moment which ACL command can I use for that purpose.

Thank you!

Paulette

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How do I modify the content of one fo my elements?

Hi Paulette--

The easiest thing is to delete the old content and insert the new. Something like this should do the trick:

function replaceContent(oid, newContent) {

# where oid is the oid you want to modify, and newContent is a markup string you want to put there instead of what's there now

oid_delete(oid, 0x2); # 0x2 flag = delete element content, but preserve tags

goto_oid(oid);

insert(newContent);

}

--Clay

View solution in original post

2 REPLIES 2

Re: How do I modify the content of one fo my elements?

Hi Paulette--

The easiest thing is to delete the old content and insert the new. Something like this should do the trick:

function replaceContent(oid, newContent) {

# where oid is the oid you want to modify, and newContent is a markup string you want to put there instead of what's there now

oid_delete(oid, 0x2); # 0x2 flag = delete element content, but preserve tags

goto_oid(oid);

insert(newContent);

}

--Clay

View solution in original post

Re: How do I modify the content of one fo my elements?

Clay,

Thank you so much. As always your help is more than appreciated and of course very very useful.

--Paulette

Announcements