[scribus] Use API to Clone Style

Gregory Pittman gpittman at iglou.com
Fri Feb 4 18:19:26 UTC 2022


On 2/4/22 12:40, Matt Miller wrote:
> I was hoping to use the API to clone several paragraph and character styles and then change just a couple attributes. However I can't see any way to do that in the API. I don't even see an API for getting the attributes of a style. Am I missing something?
> 

Hi Matt,

Yes, you're right, you can't change attributes of an existing style. You can get a list of existing styles, and create styles.

What you want to do is easier outside of Scripter. Just Edit > Styles, and then pick the style you wish to edit. Note that you can also import styles from another document - this might be a form of cloning. When you create a style, you can specify which style it is based on, which is in essence cloning too.

Greg




More information about the scribus mailing list