Scribus Forums

Scribus => Scripts and Plugins => Topic started by: agricola on April 25, 2016, 04:48:52 pm

Title: How to get the paragraph style
Post by: agricola on April 25, 2016, 04:48:52 pm
Hi everybody,

I want to get (or read out) the paragraph style that is currently applied to a text frame or to a certain portion of the text within a text frame by means of scripting.
Let's say, I'm searching for a scribus-function like "getStyle(selectedFrame)" or something like that, knowing, that there is a function "setStyle(styleName, selectedFrame)",
doing just the opposite.

Many thanks for your ideas and help!
Title: Re: How to get the paragraph style
Post by: michaelu on October 11, 2019, 04:22:56 pm
getStyle is implemented in the newer Scribus versions. It must have been added between 1.5.2 and 1.5.6. It returns the paragraph, not the character style, or None, if no style is set, for the current selection.   Usage: style=scribus.getStyle(["name"])