Re: RTF in conf files

"Troy A. Griffitts" <[email protected]>
Newsgroups gmane.comp.literature.sword.devel
Message-ID <[email protected]>
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.

On April 16, 2024 04:20:51 GMT-03:00, domcox <[email protected]> wrote:
>
>Only a very small, restricted subset of RTF markup is supported, see:
>https://wiki.crosswire.org/DevTools:conf_Files#RTF
>
>
>"David \"Judah's Shadow\" Blue" <[email protected]> writes:
>
>> I'm working on an info command to display some basic info about modules, and I
>> ran into the fact that, at least in the About entry, the conf file can contain
>> RTF formatting. As it stands I strip out \pard, replace \par with \n, and
>> strip out the tag portion of any anchor/link tags found. My question is, are
>> there any other tags that are likely to appear in conf entries that I should
>> be either handling or stripping (since my front end does no formatting of text
>> whatsoever)?
>
>
>-- 
>Dom
>_______________________________________________
>sword-devel mailing list: [email protected]
>http://crosswire.org/mailman/listinfo/sword-devel
>Instructions to unsubscribe/change your settings at above page

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

_______________________________________________
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.