albertgasset / dokuwiki-plugin-codemirror Goto Github PK
View Code? Open in Web Editor NEWThis project is now hosted on GitLab https://gitlab.com/albertgasset/dokuwiki-plugin-codemirror
License: GNU General Public License v2.0
This project is now hosted on GitLab https://gitlab.com/albertgasset/dokuwiki-plugin-codemirror
License: GNU General Public License v2.0
CodeMirror plugin for DokuWiki ============================== Documentation for this plugin can be found at http://www.dokuwiki.org/plugin:codemirror Source code for this plugin can be found at https://github.com/albertgasset/dokuwiki-plugin-codemirror ---- Copyright (C) 2014-2017 Albert Gasset <[email protected]> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
In the screenshot below, there is a letter 'f' and a space after the letter, and the cursor is right after the space character.
However, if I'm editing anywhere in the middle of the line, this problem doesn't occur.
I have tried on a fresh installation of DokuWiki to make sure plugins weren't interfering with this, and this problem doesn't occur on Firefox.
I'm using Safari 10.0.1.
Hi,
Would it be possible to use a named function instead of an anonymous function as a plugin wrapper, so that it can be called by other plugins?
The linux typical insert with middle mouse button don't work.
It's a bug or a feature? ;-)
Hi, I replaced dokuwiki syntax with markdown (via markdowku plugin), in addition the source is plenty of LateX code.
I don't know if it is already possible, but I couldn't activate Latex and/or Markdown syntax highlighting in the source editor via codemirror.
I know it is possible in the rendered html, but I'ld need it for the code editor.
Netsaver Paul, Rome, IT
Hi,
I have installed this plug-in on a closed wiki that is using the Vector template. However, it seems that the plug-in is not compatible with this template as it adds half-spaces between the lines. However, if I disable the Vector template and use the dokuwiki default template, the plug-in looks and works as expected.
Perhaps I've got an old version (2014) but it seems that the 'div' of the edit form is not resizable.
It would be great to have it resizable adding this kind of css statement:
form#dw__editform .CodeMirror {resize: both;}
Sorry if it's done in the current version...
After installing the codemirror plugin I´m not able anymore to select more than one line of text in the editor. (only one line is possible)
+
When I try to use the Typography plugin (select 1 line or a single word) the result look like:
I select the 2 words: selected text
and then use the plugin icon for e.g. medium text, the result is:
====
selec
When enabled, codemirror disables linksuggest funcionality.
Hi,
Please support for SyntaxHighlight3 Plugin
It has a syntax like below:
print "hello world"
I think it is possible through linking with a process of '<code ~~~>...'.
Thanks for the great program. I was thinking about customizing it per instructions on codemirror.net, but the full code mirror package is not included in the plugin. The codemirror folder is empty, so it's not obvious how one would add plugins, change style and so on. Is there a reason why its not there?
Hello,
I would like to have a completion of existing achors/links (within a namespace) by pressing ctrl-space after typing "[[". Often I do not know the correct link names and searching for them in a different browser tab is not very handy.
Would this an interesting feature you could imagine to implement? Or when I want to implement that on my own what's the best way to do so (clone your repository or checkin to yours)?
Regards,
Ralf
I would like to have syntax highlighting for the famous wrap-plugin, but writing a mode modul for this seems to be to complicated for me.
The codemirror has some very nice new features, but I really missed some useful shortkeys:
Move lines down/up (Alt-Up/Down)
Ident/Outdent (Tab/Shift-Tab)
Replace {All] (Strg-{Shift}-R)
Can you help?
Hi,
installed the latest Version of codemirror plugín for dokuwiki.
It is not possible to highlight any text in ie while editing. When I use F12 in Chrome (in Chrome the highlight work) it shows:
GET http://.../dokuwiki/lib/plugins/codemirror/dist/scripts.min.js.map 404 (Not Found)
lib/plugins/codemirror/dist/modes/htmlmixed.min.js.map:1 GET http://..../dokuwiki/lib/plugins/codemirror/dist/modes/htmlmixed.min.js.map 404 (Not Found)
xml.min.js.map:1 GET http://.../dokuwiki/lib/plugins/codemirror/dist/modes/xml.min.js.map 404 (Not Found)
javascript.min.js.map:1 GET http://.../dokuwiki/lib/plugins/codemirror/dist/modes/javascript.min.js.map 404 (Not Found)
css.min.js.map:1 GET http://.../dokuwiki/lib/plugins/codemirror/dist/modes/css.min.js.map 404 (Not Found)
Hello.
We use Firefox plugin for spell checking that works fine with plain Dokuwiki textarea, however it doesn't get along with CodeMirror.
From brief googling I realized it's rather CodeMirror's issue. I report it here though to suggest adding a feature that would allow temporarily switch off the CodeMirror and display only the underlying(?) textarea.
I'm witnessing a weird behavior. On a page we have lots of curl commands and explanations for ontology related calls and such. This means we have a lot of text that "looks" like a Smiley but is included in inline code tags or actual code blocks. It appears CodeMirror breaks when some of these elements are tried to be parsed. My Chrome console shows:
codemirror.js:5391 Uncaught SyntaxError: Invalid regular expression: /^(?:8-\\\\
...
LOTS of backslashes
...
\\\:LOL|FIXME|DELETEME)(?=\W|$)/: RegExp too big
To reproduce (put errorpage from the pastebin below into your wiki):
Move cursor to the end of the "--header" section. Right behind ''X-Custom-Header:''
Type a space " ".
This immediately makes the entire preview text disappear and the editor unusable. After a couple of seconds the tab becomes unresponsive. Then after a few more seconds the console shows the error described above and depicted in the screenshots.
When I comment out all entries in "smileys.conf" then the error message says:
codemirror.js:5964 Uncaught SyntaxError: Invalid regular expression: /^(?:<->|->|<-|
I get the same errors referencing to min.js but I guess that just because of the script compression.
http://gfycat.com/BitesizedUnfortunateCirriped
Find the full page that causes this here: http://pastebin.com/SVnNr053
I'm running Detritus with CodeMirror 20150827
It seems like codemirror just follows geshi in deciding what languages to highlight, which means quite a few languages are left out. Would it be worthwhile to just highlight every lang within <code lang> ... </code>
that codemirror can highlight?
I see this plugin's js and css doesn't get added to dokuwiki's compressed files, so maybe it would be easy to have it only load for logged in users?
Hi Albert,
pasting stuff from the mousebuffer with middle mouse button into the editor windows does not work with enabled codemirror plugin. If we use the standard dokuwiki editor, pasting with middle mouse button works.
system is fedora19, same issue on fedora20.
browsers are firefox in versions: 34, 37
do you need more information about the system? I will provide it.
is it basically supposed to work? or do you catch middle mouse button for something else?
hope you can help us with this issue, we just upgraded our dokuwiki to the newest hrun version and find your codemirror editor pretty neat and useful :)
all the best
Jojo@LINBIT Vienna
Middle mouse button paste fails on my desktops in firefox/iceweasel and opera. Most of the time nothing happens. Firefox sometimes (but not always) behaves as if the back button was pressed. Opera sometimes segfaults.
However, middle mouse button paste works as expected in chromium, konqueror and rekonq.
BTW, thank you for the very useful plugin! I'd be pleased if it would be integrated in dokuwiki main someday.
---<)kaimartin(>---
reproduce like below:
* aaa (fine)
* bbb (fine, highlight)
* ccc (problem, begin highlight)
* ddd (problem, highlight)
* ... infinite syntax highlight on list ...
Hey,
since i updated to last revision i always get a problem with links in editor. If i write an external link starting with http:// or https:// i cannot save or preview the updated content. instead the acton performed when pressing the save or preview button is the direct download of doku.php
this is really strange. i think there is an escape problem
can you add the following plugin?
Hi,
tagentry uses the textarea "wiki__text" to make changes with the tags. With codemirror plugin enabled this doesn´t work.....
Is there a chance to get tagentry work with codemirror? Is there a way to tell your plugin with the script.js from tagentry there where changes for the page?
Thanks
I've been ussing dokuwiki to keep track of my projects for a few months now (The release bundled with mapache, in win32) and today, after a month or so of dissuse, I opened the wiki. The first thing I did was updating the plugins, which from the top of my head were Codemirror, Cgkedit, and fastwiki.
Then I went to edit a page and, surprise, I got this:
Which is really weird, because habitually it only looks like that when I forget javascript disabled. After some dabbling -disabling fastwiki and deleting the cache- I improved things a bit, , to get at least the basic DW editor. Which, again, is strange because after re enabling fastwiki it still looks the exact same way.
For now I've deleted the cache and removed the cgkedit plugin, but I still haven't been able to get codemirror to show itself. even after downgrading codemirror. These are the plugins I am currently ussing, which I had used without troubles before.
When I enter edit mode with CodeMirror active, the edit window only shows about 17 lines. I had configured it to show about twice as much. If I click on the arrow buttons below the edit area to change the height of the edit area, the correct (previously saved) height is applied. But that only lasts until the next time I enter edit mode.
When line numbering is activated in the settings menu the formatting breaks when the number becomes larger than the sidebar width. For example:
When the number of lines reaches 100 the number is displayed as
10
0
all subsequent numbers are rendered overlapping the indented last number and is no longer usable. The problem temporarily solves itself when the line number reaches four digits and occurs again when the number reaches five digits and so on ...
Please see attached screenshots for the described behavior.
100 Lines
999 Lines
1000 Lines
100.000 Lines
When i click Edit Button, shown nothing, the whole page is blank
Hi,
I want to configure default settings(theme, font size, key mappings and more) for codemirror editor in DokuWiki's Configuration Settings page.
There is an abbreviation tooltip feature in DokuWiki that can only be disabled by deleting or emptying the file /conf/acronyms.conf. If I do so the codemirror editor will not function.
I will click to edit a page but instead see an empty "default" editor dialog (even though the page has content) but you can not (fortunately) enter anything into the editor or save.
From what I can tell codemirror uses the acronym list to highlight corresponding words in the editor view. It would be nice to be able to disable acronyms for whatever reason and still be able to use the codemirror editor.
Hi,
Thanks a lot for this wonderful plugin. And I haven't yet tested the Vim key map. Indeed, it is amazing.
I don't know if it is a bug or a conflict with other plugin but the spellchecking doesn't work for me. I have tested quite all theme color, enable or disable options, and on Chromium and Firefox.
Annoying, because it is useful. Btw, it is possible to come back to native editor for spellchecking.
An idea on this issue.
Thanks,
When I create a new line via the return key, the editor view, does not scroll down. The scroll happens on the first character input afterwards.
I have this problem on chromium 50.
Syntax highlight is not work when indent <code>
, like below:
* test <code python>
# test
# test
</code>
text
is not detected correctly (with and
in the same line)--> switch hilight off for the further text
text
work correctlyPlease Add Plugin to http://translate.dokuwiki.org/
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();
}
});
with current mobile support.
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.