Skip to content
This repository was archived by the owner on Nov 23, 2017. It is now read-only.
This repository was archived by the owner on Nov 23, 2017. It is now read-only.

Doesn't work with fastwiki plugin #59

Description

@zioth

fastwiki (https://www.dokuwiki.org/plugin:fastwiki) switches to edit mode without reloading the page, so codemirror doesn't work when it's installed. Several people have wanted to use the two plugins side-by-side (see zioth/dokuwiki_fastwiki#18).

I'm not sure how to install the uncompressed version of your plugin, but I believe you can fix this by adding the following code to init.js:

    // fastwiki plugin support
    jQuery(window).on('fastwiki:afterSwitch', function(evt, viewMode, isSectionEdit, prevViewMode) {
        if (viewMode == 'edit' || isSectionEdit) {
            var textarea = jQuery('#wiki__text');
            if (textarea.length) {
                initMode();
                initHooks();
                initSettingsMenu();

                if (getSetting('nativeeditor') === '0') {
                    initCodeMirror();
                }
            }
        }
        else {
            destroyCodeMirror();
        }
    });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions