Proof of Concept: New Textile Editor for slate
March 11th, 2007 — 11:25 pm —I’ve been intimidated by this project for a few weeks now. I’ve looked at the code a few times and just said, “I’ll come back to this later.” Well, March 16th, the release date for v0.3.2, is fast approaching so, with the wife at work, I’ve been slogging away at a new editor for slate. Unfortunately I won’t have any Snippet support available by Friday (seriously? that’s this week? sheesh…) BUT at least there’s something to add to the release. Hopefully it’s somewhat useful.
So to see if it’s useful and to see what kind of cross-browser support we have for this new editor I present a proof of concept. Check it out! Ed. note: this demo doesn’t work in IE. working on it.
First off, what’s kind of cool about the new editor:
- it’s got buttons, just like Word (blech)
- it uses access keys (e.g. bold is CTRL+b on a Mac or the equivalent on a PC)
- lists seem to work pretty well
- it has some useless things like right justify
- you can select multiple paragraphs and style them at the same time
Second, what’s not so cool:
- the buttons are tiny, too lazy to come up with custom graphics
- only h1 so far, want to add a drop down list for the others
- indent works… for one level. i want to be able to indent multiple levels and indent lists as well
- only default styles for lists, be cool to do more with that
- I want to figure out how to do a find and replace on the Word bullet characters
- yeah, it’s a JS-based preview which sucks, deal
- would like to get a core and extended version working
- missing snippets!
The last one really irks me but… not going to get done this week. Luckily for me the roadmap only says Textile support. Thanks, Chris!
Ok, again check out the proof of concept and let me know what needs to be fixed (or if it even works for you!).
Credit to Alex King and his JS Quicktags for providing inspiration and Patrick Woods for providing me with a start.
Looking at Sarah G., put in some stuff from Word that you’ve had to put into slate in the past and let me know if it’s any faster to manipulate the content. Lists are still going to be a slight pain. That and the preview might not work but all the tags are correct.
About slate
slate is a content management system (CMS) developed using Ruby on Rails focused on rapid production of traditional websites created by WVU Web Services. Read more about why we created slate and a longer list of features of slate. You can also check out a list of sites using slate. If you have questions or comments let us know but if it's a question about open sourcing slate have a look at this article first.Archives
Recent articles
- No Wonder Rails Is Default in Mac OS X Server...
- Good News: An Open Sourced slate Is Coming
- The WVU Open Source License
- Implementation idea: .do templates
- Keeping slate Humming - Part 1
- Campfire for Design & Keeping Your Tag Cloud Running
- Custom configuration settings made easy
- HOW-TO: Add a Gallery to Your Site
- JSONRequest.post Example
- Miscellaneous
Articles
First of all, this is actually working pretty well. I'm liking it so far. One thing we need to work on is keeping selected text selected. For example, you select three lines of text, then click the bulleted list button. What currently happens is the caret moves to the end of the selected. Ideally, it should still wrap the selected text (as well as the new characters that have been added. Another thing to address is blank lines: blank lines should be ignored at least for lists and things like that. As far as multiple indents, this shouldn't be too difficult - just a regex at the beginning of each paragraph to see if we already have the necessary characters, and if so we simply add another ( to the mix. Something else: changing paragraph alignment should replace any previous alignment. So, clicking right align then left align on a paragraph should remove the right align markup and replace it with left align markup. This of course will only work if the user has selected the text and markup, but in the case of keeping selected text selected, it should work appropriately. Same thing for lists, I suppose.
Add comment
You are adding a new comment