22 Jun 2002 mglazer   » (Journeyer)

Editable Content WYSWIYG regions in MSIE

function chgSpan() {
    currentState = oSpan.isContentEditable;
    newState = !currentState;
    oSpan.contentEditable = newState;
    oCurrentValue.innerText = newState;
    newState==false ? oBtn.innerText="Enable Editing" :
        oBtn.innerText="Disable Editing"
<BODY onload="oCurrentValue.innerText = oSpan.isContentEditable;">

Click the button to enable or disable SPAN content editing.

<BUTTON ID="oBtn" onclick="chgSpan()">Enable Editing</BUTTON>

<SPAN ID="oSpan">You can edit this text.</SPAN> SPAN can be edited: <SPAN ID="oCurrentValue"></SPAN> </BODY>

By simply adding persistence and a save this link to each editable region. You can now have a localised wiki. Without persistence the save can be uses with JSRS to save remotely withotu reloadign the page for a real wiki.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!