Last active
September 5, 2017 17:15
-
-
Save stelf/d4e72a19ce1dbb18bffce4d4768d48ba to your computer and use it in GitHub Desktop.
the missing scribus.replaceText() call which preserves styles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scribus | |
tb = 'Text2' | |
repl = 'new cntent' | |
l = scribus.getTextLength(tb) | |
scribus.selectText(0, l-1, tb) | |
scribus.deleteText(tb) | |
scribus.insertText(repl, 0, tb) | |
l = scribus.getTextLength(tb) | |
scribus.selectText(l-1, 1, tb) | |
scribus.deleteText(tb) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment