Scribusoid

Author Topic: How to get the paragraph style  (Read 1224 times)

agricola

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
  • Scribus User
How to get the paragraph style
« 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!

michaelu

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
  • Scribus User
Re: How to get the paragraph style
« Reply #1 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"])

 

palmate