T
Timasmith
It seems inevitable with a great many enterprise applications that a
specialized document editor is required. Often to replace a standalone
process which utilizes say Microsoft Word.
Suppose I need to have a document editor in which the user can utilize
templates and insert business data directly from other areas of the
application. One goal is to reduce typing by smart use of shortcuts to
content or data. The end goal is to produce a document which may be
further edited by others or etched in stone.
The problem is that users, being used to WYSIWYG, expect the ability to
have all the power of MS Word integrated into the editor and yet as
developers we want the seperation of content and formatting, and in my
case it must run in Swing on both unix and windows platforms.
What to do? I perused various packages from JEdit to various HTML
editors. It doesnt look like there is anything suitable, most (like
JEdit) work with raw text markup and that is not acceptable for most
business users. The others produce HTML with various degress of
success - but then you lose any possible structured content.
So lets suppose we start from scratch. I dont have the time or
resources to do a fully fledged XML/XSLT WYSWYG editor, not sure I
could if I tried. Instead I am looking for a workaround that meets my
needs.
One thought is have the user work on a section at a time with a plain
text editor. I could store the text blocks as discreet chunks in the
database and dynamically lay out controls on the 'form' as it is
generated. Any paragraph (or selected text) could be broken into a
chunk for editing in an editor pane with properties such as 'heading 1,
heading 2, colors etc' available. As the user leaves a block so it is
displayed as a label. This has some advantages as it would be a real
control allowing double clicking, right clicking and various forms of
manipulation. I am not sure but think this might be easier to code
than a straight text editor?
There must be many strategies, some Swing specific perhaps but it is a
general design issue.
specialized document editor is required. Often to replace a standalone
process which utilizes say Microsoft Word.
Suppose I need to have a document editor in which the user can utilize
templates and insert business data directly from other areas of the
application. One goal is to reduce typing by smart use of shortcuts to
content or data. The end goal is to produce a document which may be
further edited by others or etched in stone.
The problem is that users, being used to WYSIWYG, expect the ability to
have all the power of MS Word integrated into the editor and yet as
developers we want the seperation of content and formatting, and in my
case it must run in Swing on both unix and windows platforms.
What to do? I perused various packages from JEdit to various HTML
editors. It doesnt look like there is anything suitable, most (like
JEdit) work with raw text markup and that is not acceptable for most
business users. The others produce HTML with various degress of
success - but then you lose any possible structured content.
So lets suppose we start from scratch. I dont have the time or
resources to do a fully fledged XML/XSLT WYSWYG editor, not sure I
could if I tried. Instead I am looking for a workaround that meets my
needs.
One thought is have the user work on a section at a time with a plain
text editor. I could store the text blocks as discreet chunks in the
database and dynamically lay out controls on the 'form' as it is
generated. Any paragraph (or selected text) could be broken into a
chunk for editing in an editor pane with properties such as 'heading 1,
heading 2, colors etc' available. As the user leaves a block so it is
displayed as a label. This has some advantages as it would be a real
control allowing double clicking, right clicking and various forms of
manipulation. I am not sure but think this might be easier to code
than a straight text editor?
There must be many strategies, some Swing specific perhaps but it is a
general design issue.