KTextToHTML
KTextToHTML Namespace Reference
Typedefs | |
typedef QFlags< Option > | Options |
Enumerations | |
enum | Option { PreserveSpaces = 1 << 1 , ReplaceSmileys = 1 << 2 , IgnoreUrls = 1 << 3 , HighlightText = 1 << 4 , ConvertPhoneNumbers = 1 << 5 } |
Functions | |
KCOREADDONS_EXPORT QString | convertToHtml (const QString &plainText, const KTextToHTML::Options &options, int maxUrlLen=4096, int maxAddressLen=255) |
Detailed Description
Typedef Documentation
◆ Options
typedef QFlags< Option > KTextToHTML::Options |
Stores a combination of Option values.
Definition at line 55 of file ktexttohtml.h.
Enumeration Type Documentation
◆ Option
enum KTextToHTML::Option |
- See also
- Options
- Since
- 5.5.0
Definition at line 24 of file ktexttohtml.h.
Function Documentation
◆ convertToHtml()
QString KTextToHTML::convertToHtml | ( | const QString & | plainText, |
const KTextToHTML::Options & | options, | ||
int | maxUrlLen = 4096, | ||
int | maxAddressLen = 255 ) |
Converts plaintext into html.
The following characters are converted to HTML entities: & " < >. Newlines are also preserved.
- Parameters
-
plainText The text to be converted into HTML. options The options to use when processing plainText
.maxUrlLen The maximum length of permitted URLs. The reason for this limit is that there may be possible security implications in handling URLs of unlimited length. maxAddressLen The maximum length of permitted email addresses. The reason for this limit is that there may be possible security implications in handling addresses of unlimited length.
- Returns
- An HTML version of the text supplied in the 'plainText' parameter, suitable for inclusion in the BODY of an HTML document.
- Since
- 5.5.0
Definition at line 421 of file ktexttohtml.cpp.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:56:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:56:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.