Re: RTF in conf files

"Troy A. Griffitts" <[email protected]>
Newsgroups gmane.comp.literature.sword.devel
Message-ID <[email protected]>
Yes, you are correct, there was no RTFPlain filter.  If you svn update, 
you should see it now.  I just copied the RTFHTML filter and changed it 
to output newlines instead of <br/> and a couple tabs for center.  I was 
surprised to see how few RTF tags we support in this filter, but these 
must be the only ones we list on the wiki because I use the RTFHTML 
filter everywhere.  I also remember we support 1 single HTML tag, so you 
will likely need to handle this in your frontend: <a href="link">Link 
Text</a>

Sorry about the misinformation.

Troy


On 4/23/24 11:06, David "Judah's Shadow" Blue wrote:
> On Tuesday, April 16, 2024 5:35:50 AM EDT Troy A. Griffitts wrote:
>> There is an SWFilter to help with this.
>>
>> E.g., to get HTML, try something like:
>>
>> #include <rtfhtml.h>
>> SWBuf confValue = module.getConfigValue("About");
>> RTFHTML().processText(confValue);
>>
>> If you don't want HTML, I believe there are also other RTF filter
>> conversions like RTFPlain which should give you things like your newlines
>> instead.
> Having looked into this some in the class documentation, I'm not finding a
> RTFPlain filter that I can see in the docs, There is a SWBasicFilter but I
> can't figure out how to call its processText() method.
>
> I had thought to possibly use RTFHTML and then a filter to take HTML to plain
> text, but I'm not seeing any implementation of SWFIlter that will do what I'm
> after.
>
>
> _______________________________________________
> sword-devel mailing list: [email protected]
> http://crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
_______________________________________________
sword-devel mailing list: [email protected]
http://crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.