Built-in Editors
Feb 4, 03:04 PM • e2
I’ve been using a java-based editor to do some light-development work via HTTP (the editor that’s part of the File Manager in Webmin). It’s nothing more than a text box with a save button, but it works, and it works well. I can’t begin to tell you how nice it is to have a tab button again (as tabbing in an HTML-based editor typically advances you to the next form field).
This got me thinking about my editing habits in general. A year ago I thought it was the greatest thing to include a series of buttons along the top of my web apps. You know, the typical line-up, bold, italic, paragraph, etc. A half step to having actual WYSIWYG editing.
I tried hard to use them, but they never exactly did what I wanted. You couldn’t unbold something for instance. The buttons simply dropped in an open tag when clicked once and dropped in the close tag when clicked a second time. In the event that a selection of text was highlighted when clicked they wrapped it in the tag.
Pretty plain. You see it all the time. Frankly it was easier to type <b> than it was to click the button. I added keyboard shortcuts in a vain attempt to make them more useful, but that only helped so much. I even went so far as to offer alternate actions. Holding F2 while (you try finding an bound modifer key) clicking the bold button for instance produced <strong> instead of bold. I did find the image & character placement buttons useful. But all in all the buttons remained unused.
I played around with some of the numerous WYSIWYG DHTML editors, but they just don’t offer the quality of experience I think an editor should. There is always some combination of elements that crashes them, or some bizarre tag-soup that cause weird slow-downs.
Eventually I discovered Markdown and began incorporating it into most of my web applications. While that works fine for marking up text more easily it still doesn’t address the whole WYSIWYG, user-friendly, Word-like toolbar deal.
Then it dawned on me — Java! While there aren’t as many free Java based editors as I would have expected there are a few. I’ll probably add one to e2 as an option to the e2_HTML_Admin class. I’ll also be expanding on my less-than-perfect clickable buttons toolbar system. I’ll probably add a feature to make it filter-aware (assuming filter writers will want to add thier mark-up schemes to it) allowing the editor to change what it wraps text in when the user clicks bold based upon which filter is selected.
