jsRichEdit Overview
Introducing the jsRichEdit
custom class for use with dBASE.
jsRichEdit is a custom class
which is written almost entirely in dBL code and based on the PaintBox
standard dBL class. The dBL code in the jsRichEdit class surfaces the
highly stable, widely used, and well-known richedit common controls window
class v2.0/3.0 functionality.
If you've used any of the popular word-processing programs
over the past 4-5 years, then you already know
what richedit v2.0/3.0 functionality is all about. The same basic
richedit technology is used in all sorts of applications from simple
chat applications and plaintext edit boxes to full-blown word
processing applications. Now, as amazing as
it may seem, almost all of that functionality can be easily integrated
directly into ANY dBL application with jsRichEdit
and you have full control of the functionality which the users have
access to. And your clients will already know and recognize richedit
behavior, so client training and support is also reduced.

The image above shows the jsRichEdit editor custom class on a standard dBASE
form with standard dBASE controls and dBL source code used to control almost
all aspects of editing. In fact, this is one of the sample forms included
with the jsRichEdit package.
jsRichEdit can be used for many
purposes:
- jsRichEdit is a very
stable richtext editor. In fact, this document itself was created using
jsRichEdit. Almost all of
the standard richedit v2.0/3.0 functionality is now available to you
through dBL code.
- jsRichEdit is a very
stable plaintext editor. You can use it as a replacement for the stock
Editor class in dBL applications. But instead of the limited properties
and methods of the stock Editor class, you will have the extended
functionality of jsRichEdit
available to you through dBL code.
- jsRichEdit also supports
a password display character. A simple single method call sets the
passwordChar property to the display character of choice, and all text
typed by the user is displayed using the specified password display
character. So jsRichEdit can
be used as a simple password-type of entryfield.
- jsRichEdit also supports
uppercase/lowercase translation. All text can be converted to uppercase
or lowercase as the user enters data.
- In plain text mode, jsRichEdit
can be an excellent general purpose and programmer's editor. Write your
own source code editor in dBL code with the features and functionality
you want.
- jsRichEdit provides a
rich set of features, not only for user-entry of highly formatted text,
but also for dBL source-level control, text manipulation and
formatting, and querying. It easily provides counts for bytes,
characters, words, lines, etc. You can leverage the power,
functionality, and ease of jsRichEdit
as a tool to help open the door to more sophisticated document
generation, storage, and management applications. Or add this new
functionality to existing applications.
- jsRichEdit is not an
ActiveX component, so there are no complicated and time-consuming
application deployment, ActiveX system registration, or ActiveX
licensing issues to contend with. Simply deploy the jsRichEdit dBL compiled object files
the same as you deploy the rest of the object files for your
application, either in the application EXE or using DEO. And deploy the
small jsUtils.dll file as
you would any other dll required by your application. The best place
for the dll is in the same folder path where the application EXE is
located. Now jsRichEdit is
ready to work for you. It really is that simple.
For those of you who don't believe it, YES dBASE can do
some rather
amazing things. And now with jsRichEdit,
dBASE
becomes even more powerful.
What can the jsRichEdit custom class really do?
Bulleting
and Numbering
- This is a bulleted item.
- This is another bulleted item.
- Bulleting and numbering are fully controllable in dBL code.
- Even the spacing between individual bullets or numbers and the
text can be controlled.
- Any and all jsRichEdit
functionality can also be surfaced to the user through dBL stock UI
classes.
Numbered lists.
- This is a counted list.
- Counted lists can start at any number desired.
- The starting number can be set from dBL code.
Alphabetized lists.
Roman numeral lists.
Paragraph Alignment
jsRichEdit surfaces almost all
standard richedit v2.0/3.0 functionality including justification.
Text can be left-justified.
Or as you've probably already noticed from above, text can be centered.
And right-justification is also supported just as easily.
And to even up both left and right ends of text lines, text
justification between the left and right display borders is also
supported.
Font Play
This is the Arial 10pt font which is the dBASE
default. Personally I
think believe it should have been defaulted to 9.
This is the Courier 10pt font. As you'll see, all fonts and effects
work well.
Wanna make an Impact ? This is the Impact 10pt font.
It really stands out in the crowd.
This is the MS Sans Serif 10pt font. This is our default friend
from the old Visual dBASE 5.x
days.
This is the System 10pt font. What can I say about this
one...not much.
This is the Times New Roman 10pt font. Great for that old
type-setter's look.
Now we're back to the Arial 10pt font to play with fontsize.
Yes Virginia, we can do almost anything we want to do with fonts now.
And save the document to a regular
dBASE table
memo field or any other
character-based memo-type field. The jsRichEdit
custom class even provides the hooks for dataLinking to the data table
field for you.
Oops! Now how did those dotted underlines get into those lines above?
That is simply functionality that is built into the richedit window
class that is surfaced by the jsRichEdit
class. Note however that other word processors and richtext editors
that support richtext may not support dotted underlines in text. In
many cases, dotted underlines will be displayed as solid underlines
instead of dotted underlines. Dotted underlining is only one example of
functionality that is built-in to the richedit window class and
surfaced by jsRichEdit that is
rarely if ever seen in other software. This allows you to implement
unique and exclusive features in dBL applications for you and your
clients.
Oh! And did I mention Color too?
But WAIT... there's even more yet.
What we've covered so far is the easy stuff.
What about some more advanced and complex stuff?
Control vertical spacing before and after paragraphs.
Control vertical line spacing within paragraphs.
Selectable single or multi-level undo/redo.
Full clipboard copy/cut/paste support of selected text or entire
contents in plaintext or richtext under UI and/or dBL control.
Insert files directly at the current position within the editor.
Save the currently selected text or the entire contents to a file in
plaintext or richtext.
Count bytes, characters, words, lines, or paragraphs in documents for
statistical purposes.
Dual-mode plaintext/richtext functionality.
Built-in switchable wordwrap.
Advanced search capabilities.
Find Text
Replace Text
Go to Line
Set/reset fixed and custom tabstops.
Also very good for static display and printing of columnar data.
Printing of all or selected contents in the jsRichEdit control.
The jsRichEdit package
includes transparent dll-resident bitmaps for use on dBL PushButtons
and ToolButtons within your applicaitons.
Integrated right-click dBL popup edit menu which can also be turned off
if required.
dBL dialogs fully integrated with the jsRichEdit
class for advanced Find, Replace, GoTo, and setting/resetting custom
tabstops.
Demo forms to use as a resource for implementing jsRichEdit functionality in dBL
applications.
Full-featured dBL word processing form and companion menu file which
uses the jsRichEdit class that
you can include in your own dBL applications as-is or you can customize
it to your specific needs. This is the same form that this document was
created in. And this form also serves as another dBL sample for you to
examine to learn how to take advantage of all of the jsRichEdit class functionality.
Use jsRichEdit to replace the
stock Editor class in
dBASE
for plaintext work.
Use jsRichEdit in all kinds of
document generation and processing applications for richtext work.
All jsRichEdit functionality
is directly accessable and customizeable from dBL code.