View Issue Details

IDProjectCategoryView StatusLast Update
0002049ScribusScripterpublic2005-06-04 08:30
Reporterfcoiffie Assigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
Status acknowledgedResolutionopen 
Platformi386OSLinuxOS VersionGentoo
Product Version1.3.0cvs 
Summary0002049: To format text and get format with some tags
DescriptionI'm a beginner with scripting Scribus.
I don't find any functions to insert a text with format. Secondly, if I format a text in the UI, I can't get this format with a getText() function.

It could be useful to support some tags like HTML (or maybe Qt). For example, to use :
setText("AbcdefABCDEF", textframe)
and
getText(textframe) -> "AbcdefABCDEF"

Maybe with , , , <font>... (very basic tags)

Secondly, it could allow to copy a part of a text frame in another text frame (with keeping the format).

I don't know if it's possible : it's just a suggestion.
TagsNo tags attached.
Patch

Relationships

related to 0001394 acknowledged XML based editing 
child of 0003813 acknowledged Metabug: Scripter 

Activities

ringerc

2005-06-04 08:27

reporter   ~0004889

This is a known limitation. Riku is working on a new text handling system for the core of Scribus. Once that's in place it should be possible to provide a nice interface to access formatted text via Python. Hopefully it'll be possible to include better support for paragraph styles and some support for character styles then too.

Until that's in place, I don't have any plans to work on styled text access from the scripter beyond what's already there. I don't think Petr does either.

You can, however, already insert styled text. The general method is to insert the text you want, then selectText(...) ranges of it and call setFont(...) on it, or set the style then start inserting text. The variety of styling info you have access to with this method is a bit limited.

ringerc

2005-06-04 08:30

reporter   ~0004890

As per the linked related bug, I'm also interested in providing access to the XML representation of Scribus's styled text (once it has a "real" one with the new file format). This might also suit your needs, though I suspect a decent text styling API would be better.

Issue History

Date Modified Username Field Change
2005-06-03 09:04 fcoiffie New Issue
2005-06-04 08:27 ringerc Note Added: 0004889
2005-06-04 08:27 ringerc Status new => acknowledged
2005-06-04 08:29 ringerc Relationship added related to 0001394
2005-06-04 08:30 ringerc Note Added: 0004890
2006-05-13 21:39 christoph_s Relationship added child of 0003813