Sponsored Content
Full Discussion: Text formatting
Contact Us Post Here to Contact Site Administrators and Moderators Text formatting Post 302937019 by Scott on Monday 2nd of March 2015 05:04:43 PM
Old 03-02-2015
It has nothing to do with BBCode, but with how browsers turn <textarea>'s into rich-text areas that render text like a word processor would. Then, when refreshed vB would interpret that "rich text" and replace the contents with BBCode (i.e. replacing THIS with [b][i]THIS[/i][/b].

FireFox does it, and it drives me up the wall (one of about 17 reasons I can't use that annoying browser Smilie)
These 2 Users Gave Thanks to Scott For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

formatting text

Hi, I am having a file containing entries like: .iso.org.dod.internet.mgmt.mib-2.system.sysName.0 .iso.org.dod.internet.mgmt.mib-2.system.sysLocation.0 .iso.org.dod.internet.mgmt.mib-2.system.sysServices.0 .iso.org.dod.internet.mgmt.mib-2.system.sysORLastChange.0... (16 Replies)
Discussion started by: esham
16 Replies

2. UNIX for Dummies Questions & Answers

Text Formatting

I have a file like this with 1 lac lines. 1 2 3 4 5 6 7 8 9 0 I would like to format the above text file 1 2 3 4 5 6 7 8 9 0 (7 Replies)
Discussion started by: aravindj80
7 Replies

3. UNIX for Dummies Questions & Answers

Text file formatting

Hi all! I'm new in unix, and faced with some difficulties. So I have text file f.e. "textfile" which contains rows like: aaa bbb ccc ddd How could I format it, so the file looks like: aaabbb cccddd Thanks in andvance (5 Replies)
Discussion started by: consta.v
5 Replies

4. Shell Programming and Scripting

text formatting

Hi, any idea input: mr.smith stvenson: /address #/tel no/ personal data profile. mrs.smith stevenson: /address #/tel no/occupation/ personal data profile. output: mr.smith stvenson address #: tel no: personal data profile. mrs.smith stevenson address #: tel no: occupation:... (7 Replies)
Discussion started by: kenshinhimura
7 Replies

5. UNIX for Dummies Questions & Answers

Formatting TEXT

Hello, I have the following lines in a text file: /var/spool/postfix/defer/1/15C86B0547C /var/spool/postfix/defer/1/19AD1B054A2 /var/spool/postfix/defer/2/25A16B05493 /var/spool/postfix/defer/6/626FBB05496 /var/spool/postfix/defer/6/634D4B0544A /var/spool/postfix/defer/6/6A8ACB05499... (2 Replies)
Discussion started by: mojoman
2 Replies

6. Shell Programming and Scripting

Text formatting

I have an input file as below. 1 Sanjib Gayen 2 Chetan Jadhav 3 Vijaykumar Uddi 4 Pinaki Sarkar I want to generate an output file as below. 1-Sanjib Gayen 2-Chetan Jadhav (4 Replies)
Discussion started by: R0H0N
4 Replies

7. Shell Programming and Scripting

Text formatting

A folder is having n number of files each file is having column names in it .Hence using below code . for file in /xxx/sss/* do filename=$( basename $file ) sed -e '1,2d; $d; /^*$/d; /selected\.$/d' ${file} | \ sed -e '1s/^/INSERT INTO '${filename}' VALUES (/; $!s/$/,/; $s/$/);/'... (6 Replies)
Discussion started by: rocking77
6 Replies

8. Shell Programming and Scripting

Help with Text formatting

I am generating the o/p as: BLANSWER 112747 112747 TBLQSTN 983 692 INITIATIVE 35 35 PAIGN 3122 3538 IGNCONTACT 90136 93534 IGNGROUP 27 27 AIGNSTEP 16899 20437 AIGNTYPE ... (1 Reply)
Discussion started by: karumudi7
1 Replies

9. Shell Programming and Scripting

Text formatting help

I have bunch of files with data's like below. archive.log.0104 ar0104_akl ar0731_rln ar0731_rsl M70148I need to compile all those files into a single file(.xls file) in the below format. 1st row is file name - should come in 1st column in excel In 2 - 4 row, all entries starts with... (13 Replies)
Discussion started by: vasanth_123
13 Replies

10. Shell Programming and Scripting

Help Me with the formatting of text

Hi, I am new to this forum; I need a help for my scripting problem. I have made a script in Unix which is extracting a report but the issue is that report is not in a proper format. Original Report Ex: Field 1....................... a b c d e f g Field 2............. @ID.@ID Field... (4 Replies)
Discussion started by: tush
4 Replies
QSimpleRichText(3qt)													      QSimpleRichText(3qt)

NAME
QSimpleRichText - Small displayable piece of rich text SYNOPSIS
#include <qsimplerichtext.h> Public Members QSimpleRichText ( const QString & text, const QFont & fnt, const QString & context = QString::null, const QStyleSheet * sheet = 0 ) QSimpleRichText ( const QString & text, const QFont & fnt, const QString & context, const QStyleSheet * sheet, const QMimeSourceFactory * factory, int pageBreak = -1, const QColor & linkColor = Qt::blue, bool linkUnderline = TRUE ) ~QSimpleRichText () void setWidth ( int w ) void setWidth ( QPainter * p, int w ) void setDefaultFont ( const QFont & f ) int width () const int widthUsed () const int height () const void adjustSize () void draw ( QPainter * p, int x, int y, const QRect & clipRect, const QColorGroup & cg, const QBrush * paper = 0 ) const void draw ( QPainter * p, int x, int y, const QRegion & clipRegion, const QColorGroup & cg, const QBrush * paper = 0 ) const (obsolete) QString context () const QString anchorAt ( const QPoint & pos ) const bool inText ( const QPoint & pos ) const DESCRIPTION
The QSimpleRichText class provides a small displayable piece of rich text. This class encapsulates simple rich text usage in which a string is interpreted as rich text and can be drawn. This is particularly useful if you want to display some rich text in a custom widget. A QStyleSheet is needed to interpret the tags and format the rich text. Qt provides a default HTML-like style sheet, but you may define custom style sheets. Once created, the rich text object can be queried for its width(), height(), and the actual width used (see widthUsed()). Most importantly, it can be drawn on any given QPainter with draw(). QSimpleRichText can also be used to implement hypertext or active text facilities by using anchorAt(). A hit test through inText() makes it possible to use simple rich text for text objects in editable drawing canvases. Once constructed from a string the contents cannot be changed, only resized. If the contents change, just throw the rich text object away and make a new one with the new contents. For large documents use QTextEdit or QTextBrowser. For very small items of rich text you can use a QLabel. See also Text Related Classes. MEMBER FUNCTION DOCUMENTATION
QSimpleRichText::QSimpleRichText ( const QString & text, const QFont & fnt, const QString & context = QString::null, const QStyleSheet * sheet = 0 ) Constructs a QSimpleRichText from the rich text string text and the font fnt. The font is used as a basis for the text rendering. When using rich text rendering on a widget w, you would normally specify the widget's font, for example: QSimpleRichText myrichtext( contents, mywidget->font() ); context is the optional context of the rich text object. This becomes important if text contains relative references, for example within image tags. QSimpleRichText always uses the default mime source factory (see QMimeSourceFactory::defaultFactory()) to resolve those references. The context will then be used to calculate the absolute path. See QMimeSourceFactory::makeAbsolute() for details. The sheet is an optional style sheet. If it is 0, the default style sheet will be used (see QStyleSheet::defaultSheet()). QSimpleRichText::QSimpleRichText ( const QString & text, const QFont & fnt, const QString & context, const QStyleSheet * sheet, const QMimeSourceFactory * factory, int pageBreak = -1, const QColor & linkColor = Qt::blue, bool linkUnderline = TRUE ) Constructs a QSimpleRichText from the rich text string text and the font fnt. This is a slightly more complex constructor for QSimpleRichText that takes an additional mime source factory factory, a page break parameter pageBreak and a bool linkUnderline. linkColor is only provided for compatibility, but has no effect, as QColorGroup's QColorGroup::link() color is used now. context is the optional context of the rich text object. This becomes important if text contains relative references, for example within image tags. QSimpleRichText always uses the default mime source factory (see QMimeSourceFactory::defaultFactory()) to resolve those references. The context will then be used to calculate the absolute path. See QMimeSourceFactory::makeAbsolute() for details. The sheet is an optional style sheet. If it is 0, the default style sheet will be used (see QStyleSheet::defaultSheet()). This constructor is useful for creating a QSimpleRichText object suitable for printing. Set pageBreak to be the height of the contents area of the pages. QSimpleRichText::~QSimpleRichText () Destroys the rich text object, freeing memory. void QSimpleRichText::adjustSize () Adjusts the richt text object to a reasonable size. See also setWidth(). QString QSimpleRichText::anchorAt ( const QPoint & pos ) const Returns the anchor at the requested position, pos. An empty string is returned if no anchor is specified for this position. QString QSimpleRichText::context () const Returns the context of the rich text object. If no context has been specified in the constructor, a null string is returned. The context is the path to use to look up relative links, such as image tags and anchor references. void QSimpleRichText::draw ( QPainter * p, int x, int y, const QRect & clipRect, const QColorGroup & cg, const QBrush * paper = 0 ) const Draws the formatted text with painter p, at position (x, y), clipped to clipRect. The clipping rectangle is given in the rich text object's coordinates translated by (x, y). Passing an null rectangle results in no clipping. Colors from the color group cg are used as needed, and if not 0, *paper is used as the background brush. Note that the display code is highly optimized to reduce flicker, so passing a brush for paper is preferable to simply clearing the area to be painted and then calling this without a brush. Example: helpviewer/helpwindow.cpp. void QSimpleRichText::draw ( QPainter * p, int x, int y, const QRegion & clipRegion, const QColorGroup & cg, const QBrush * paper = 0 ) const This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. Use the version with clipRect instead. The region version has problems with larger documents on some platforms (on X11 regions internally are represented with 16bit coordinates). int QSimpleRichText::height () const Returns the height of the rich text object in pixels. See also setWidth(). Example: helpviewer/helpwindow.cpp. bool QSimpleRichText::inText ( const QPoint & pos ) const Returns TRUE if pos is within a text line of the rich text object; otherwise returns FALSE. void QSimpleRichText::setDefaultFont ( const QFont & f ) Sets the default font for the rich text object to f void QSimpleRichText::setWidth ( QPainter * p, int w ) Sets the width of the rich text object to w pixels, recalculating the layout as if it were to be drawn with painter p. Passing a painter is useful when you intend drawing on devices other than the screen, for example a QPrinter. See also height() and adjustSize(). Example: helpviewer/helpwindow.cpp. void QSimpleRichText::setWidth ( int w ) This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Sets the width of the rich text object to w pixels. See also height() and adjustSize(). int QSimpleRichText::width () const Returns the set width of the rich text object in pixels. See also widthUsed(). int QSimpleRichText::widthUsed () const Returns the width in pixels that is actually used by the rich text object. This can be smaller or wider than the set width. It may be wider, for example, if the text contains images or non-breakable words that are already wider than the available space. It's smaller when the object only consists of lines that do not fill the width completely. See also width(). SEE ALSO
http://doc.trolltech.com/qsimplerichtext.html http://www.trolltech.com/faq/tech.html COPYRIGHT
Copyright 1992-2001 Trolltech AS, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. AUTHOR
Generated automatically from the source code. BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qsimplerichtext.3qt) and the Qt version (3.1.1). Trolltech AS 9 December 2002 QSimpleRichText(3qt)
All times are GMT -4. The time now is 02:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy