codeWord mid-term report

You might have noticed in my post to the wp-hackers list ajax saving is now fully implemented and working smoothly. Following some great advice there I have updated the main php file which is now much cleaner and WP2.6 ready. This also reminded me to tidy up a few other loose ends that weren’t in use.

Quick saving

ajax saving is fairly straight forward jquery code. It requires the original textarea to be updated with the changes from CodePress and temporarily re-enabled while the data is sent. It then shows update status and continues accordingly.

Autocomplete2

I have completely rebuilt the WordPress function lookup using this autocomplete jquery plugin. It will now find partial matches within the function name and comes with alternate colouring and a few other little tweaks, but the main reason for changing was so that I could use objects nested in an array structure to give me space to store additional data such as the functions default parameters. However now I need a method of collecting all this data to go into the array.

I’ve already fixed a bug, where it would select the first item when you press the shift modifier key (therefore you couldn’t type an underscore), but it still needs a little more time smoothing it out. One of the problems, which initially seemed to be straight forward, but still remains to be solved, is giving back focus to CodePress after the code has been inserted from the function lookup. This should be as simple as just calling the focus method on the iframe, however this only works in Safari. You can tab through the tabstops to the iframe element and it works fine in all the browsers I tested, but for some reason calling focus() won’t do the same. I tried ensuring contentEditable was set correctly and playing with the designMode setting and everything else I could find, to no avail.

Next..

My next target is to try and sort out how I’m going to link the WordPress functions back to the codex reference.

home

I’ve also set up a home for codeWord: joelstarnes.co.uk/blog/codeword/ which consists of a brief description and screenshot.

Tags: , ,
GSoC, codeWord — July 12th, 2008

3 Responses to “codeWord mid-term report”

  1. No replies Andy P:
    @Reply July 14th, 2008 at 11:22 am

    Thanks for the update Joel.

    The focus bug seems to be a real pain, I can’t seem to find any information on it myself.

    Referring to the codex will be a great addition, if that can be linked to an autocomplete on parameters then even better.

  2. No replies Otto:
    @Reply July 18th, 2008 at 2:10 pm

    Very handy.

    Suggestion: Enable it for the Plugin Editor screen too.

  3. No replies Joel:
    @Reply July 18th, 2008 at 2:39 pm

    Thanks for taking the time to look over my code Otto.

    I did in fact have codeWord enabled for the plugin editor when I first implemented CodePress. I disabled it so that I could just concentrate on testing within the theme editor context, however the screens are fundamentally so similar to the extent that I don’t think I will encounter any problems with enabling it again.



Leave a Reply

XHTML» permissible tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>