Okay, so my initial fumblings with the blog editor have failed. But I've learnt some important and interesting things along the way, which should make what I'm trying to do next much better. It means more work for me, but it should make it less like a slapped-together, hacked about bit of sample code and more like something that I'm happy to share.
Having spent a bit of time over the weekend looking at editor components, I've decide I'm going to use NicEdit as the basis for things. Although not as mature as other editor components like FCKeditor, Xinha, TinyMCE et al, it's small, fast and has a couple of neat features that I can use further along the development. Firstly, it has a plugin in development that produces XHTML code (something important to me - I want <em> and <strong> tags, not styled <span> tags) - it's not perfect, and the other editors have better ones, but it's incredibly lean and should be good enough. Secondly, and more importantly in the long run, it isn't restricted to replacing textarea boxes with its own textarea-like surface. It can make any <div> editable (or <span> or <p>), as you can see in this demo, and that would be ideal for snagging the CSS from a site so that the text you're editing appears exactly as it will when it's published. Real WYSIWYG, just like Live Writer does.
So, it's not quite back to the drawing board, because I've got an actual idea of how to develop things now (as opposed to just hacking away with a code machete).
The other thing I need to do is try and figure out how to get an AIR app to provide a valid API key to Google - but first things first, this is going to be an online editor. I'll tackle that further along the line.

0 comments:
Post a Comment