-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature request] Add CodeMirror support #18
Comments
Hi, I've managed to make them work, but it seems to require also modifying the CodeMirror plugin. The CodeMirror plugin wraps everything in an anonymous function that loads on document.ready; I've instead gave that function a name, i.e. dokuwiki_codemirror_init, and then in the fastwiki plugin, in the _initEdit function, I simply add a line to run dokuwiki_codemirror_init(). Hope that helps. |
cool workaround |
Search for jQuery(function(){"use strict";.... and replace that with function dw_cm_init(){"use strict";... then at the bottom of the script, you need to run the function, so add jQuery(document).ready(dw_cm_init()); Then in the fastwiki plugin, in the _initEdit() function, add dw_cm_init(); ... I put it after if($editform.length == 0) return; Let me know if it works! |
great |
Oh wait, also at the end of the script you need to remove the |
This patch might cause problems if you go in and out of edit mode more than once. Since codemirror is distributed compressed, I can't easily make and test a pull request, but I've submitted an issue with what I think is the right fix. albertgasset/dokuwiki-plugin-codemirror#59 |
the CodeMirror Plugin isn't loaded on inline edit
The text was updated successfully, but these errors were encountered: