private String getEditorHtml(WikiContext context, String name) throws IOException {
        String template = null;
        try {
            // NOTE: There is CSS in this template. Keep it in sync with the add_header.css file.
            //
            // IMPORTANT: Only multipart/form-data encoding works in plugins.
            // IMPORTANT: Must be multipart/form-data even for standalone because
            //            the Freenet ContentFilter rewrites the encoding in all forms
            //            to this value.
            template = IOUtil.readUtf8StringAndClose(SettingConfig.class.getResourceAsStream("/edit_form.html"));
        } catch (IOException ioe) {
            return "Couldn't load edit_form.html template from jar???";
        }

        String escapedName = escapeHTML(unescapedTitleFromName(name));
        String href = makeHref(context.makeLink("/" +name),
                               "save", null, null, null, null);
        String wikiText = "Page doesn't exist in the wiki yet.";
        if (context.getStorage().hasPage(name)) {
            wikiText = context.getStorage().getPage(name);
        }

        String parentWikiText = null;
        if (context.getStorage().hasUnmodifiedPage(name)) {
            parentWikiText = context.getStorage().getUnmodifiedPage(name);
        }
        String rebaseWikiText = null;

        if (context.getRemoteChanges().hasChange(name) &&
            !context.getRemoteChanges().wasDeleted(name)) {
            rebaseWikiText = context.getRemoteChanges().getPage(name);
        }

        // Escaping should be OK.
        String diffsFromParentToLocal = getDiffHtml(parentWikiText, wikiText);
        String diffsFromParentToRebase = getDiffHtml(parentWikiText, rebaseWikiText);

        parentWikiText = nullToNone(parentWikiText);
        rebaseWikiText = nullToNone(rebaseWikiText);

        return String.format(template,
                             escapedName,
                             escapedName,
                             href,
                             escapeHTML(name), // i.e. with '_' chars
                             escapeHTML(wikiText),
                             // IMPORTANT: Required by Freenet Plugin.
                             // Doesn't need escaping.
                             context.getString("form_password", "FORM_PASSWORD_NOT_SET"),
                             diffsFromParentToLocal,
                             diffsFromParentToRebase,
                             escapeHTML(parentWikiText),
                             escapeHTML(rebaseWikiText));
    }