DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:inlineeditor

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:inlineeditor [2011-11-04 23:38] – [Discussion] rikblokplugin:inlineeditor [2019-01-09 21:59] (current) – Corrected downloadurl, mirror failed LarsDW223
Line 1: Line 1:
 ====== inlineeditor Plugin ====== ====== inlineeditor Plugin ======
----- pluginnews ---- 
-headline: Plugins by same author 
-style: sameauthor 
----- 
  
 ---- plugin ---- ---- plugin ----
Line 14: Line 10:
 depends    :  depends    : 
 conflicts  : dw2pdf, odt conflicts  : dw2pdf, odt
-similar    : quickedit, dblclickedit+similar    : fastwiki, quickedit, dblclickedit
 tags       : ajax, editing, inline, javascript tags       : ajax, editing, inline, javascript
  
-downloadurl:http://sourceforge.net/projects/dokuineditor/files/inlineeditor.zip/download +downloadurl: https://sourceforge.net/projects/dokuineditor/files/latest/download 
-bugtracker : +bugtracker : http://sourceforge.net/p/dokuineditor/tickets/
 sourcerepo : http://sourceforge.net/p/dokuineditor/code/ sourcerepo : http://sourceforge.net/p/dokuineditor/code/
 donationurl:  donationurl: 
Line 39: Line 35:
  
 ====== Installation ====== ====== Installation ======
- +Search and install the plugin using the [[plugin:extension|Extension Manager]] or manually with the download from the [[http://sourceforge.net/projects/dokuineditor/files/inlineeditor.zip/download|SourceForge Mirror]]. Refer to [[:Plugins]] on how to install plugins manually. 
- +
-Install the plugin using the [[plugin:plugin|Plugin Manager]] and the download URL above, which points to latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually.+
  
 Then to make the toolbar work, you need to make a small change to the /lib/scripts/linkwiz.js  Then to make the toolbar work, you need to make a small change to the /lib/scripts/linkwiz.js 
 +
 +FIXME : don't work in 2012-01-25 "Angua"
  
 Change  Change 
Line 136: Line 132:
 function quickedit_save(id, range, page) function quickedit_save(id, range, page)
 { {
- pl_si.sack.onCompletion = quickedit_save_cb;+    pl_si.sack.onCompletion = quickedit_save_cb;
     pl_si.sack.URLString = '';     pl_si.sack.URLString = '';
     pl_si.id=id;     pl_si.id=id;
Line 143: Line 139:
     var text=document.getElementById("wiki__text").value;     var text=document.getElementById("wiki__text").value;
     var sub=document.getElementById("editsummary"+id+page).value;     var sub=document.getElementById("editsummary"+id+page).value;
- pl_si.sack.runAJAX('call=save_page&range='+range+'&page='+page+'&text='+text.replace(/&/g, '%26')+'&sub='+sub.replace(/&/g, '%26')+'&minor='+minor);+    pl_si.sack.runAJAX('call=save_page&range='+range+'&page='+page+'&text='+text.replace(/&/g, '%26')+'&sub='+sub.replace(/&/g, '%26')+'&minor='+minor);
 } }
 </code> </code>
Line 159: Line 155:
 ---- ----
  
-Thanks for the neat plugin, Simon!  Unfortunately, it seems to eat '+' signs so it doesn't work for me in my math-intensive wiki (using [[doku>plugin:jsmath]]).  Before editing I might have ''a + b'' but after saving it becomes ''  b''.  Any ideas? --- [[user>rikblok|Rik Blok]] //2011/11/04 23:38//+Thanks for the neat plugin, Simon!  Unfortunately, it seems to eat '+' signs so it doesn't work for me in my math-intensive wiki (using [[doku>plugin:jsmath]]).  Before editing I might have ''a + b'' but after saving it becomes ''  b''.  It looks like the plus-symbol needs to be encoded before save.  There could be other characters that also need to be encoded so I changed 
 +<code javascript> 
 +    pl_si.sack.runAJAX('call=save_page&range='+range+'&page='+page+'&text='+text.replace(/&/g, '%26')+'&sub='+sub.replace(/&/g, '%26')+'&minor='+minor); 
 +</code> 
 +to 
 +<code javascript> 
 +    pl_si.sack.runAJAX('call=save_page&range='+range+'&page='+page+'&text='+encodeURIComponent(text)+'&sub='+encodeURIComponent(sub)+'&minor='+minor); 
 +</code> 
 + 
 +Do you foresee any problems with that Thanks. --- [[user>rikblok|Rik Blok]] //2011/11/05 07:51// 
 + 
 + 
 +---- 
 + 
 +\\ 
 +\\ 
 +\\ 
 +Hello, 
 +I tried to implement inlineeditor in Dokuwiki Angua but I cannot find the text to be changed in "linkwiz.js". Anyway without the changes I cannot get it working in this release. 
 +Chris Nelis 20120216 
 + 
 +---- 
 +Hi, same for me too nothing to change in .js and doesn't do anything at all. Julian Knight, 2012-03-06 
 + 
 +Even worse, it uses old code (from quickedit?) that is DEPRECATED and so triggers lots of warning messages - I've stopped using it. Instead I've implemented a quick and dirty jQuery hack: 
 +<code> 
 +jQuery(function(){ 
 +  jQuery('#bodyContent').dblclick(function() { 
 +    window.location = '?do=edit'; 
 +  }); 
 +}); 
 +</code> 
 +This seems to work well enough for me though you should not double-click when the editor is already open as it will reopen losing your changes (you do at least get a warning). 
 + 
 +Julian Knight 2012-03-15 
 + 
 +=== 
 +Hi, 
 + 
 +Yes. The inlineeditor doesn't work in the new dokuwiki version. I don't have time to update the plugin at the moment. Anybody who would like to help are very welcome! @Julian, I like your suggestion, but it does not solve the basic issue the inline tries to solve; namely that when you hit the back button after editing you end up in the editor window (not as you should the previous wiki page).  
 +Simon-Shlomo Poil 2012-05-18 
 + 
 +==== Messes with Meta data ==== 
 +**Cautionary note:** this plugin will cause the meta data, specifically the description in the meta data, to be filled with HTML with embedded Javascript in it **on every page you modify**.  The resulting mess is something I'm still trying to clean up. 
 + 
 +I only just found about this problem when I was trying to display the "desc" column using the plugin "dir" and it was breaking the page because it just dumps whatever is in the meta field "description" into the listing and all the DIVs and javascript causes a meltdown. 
 +-[[user>fumigator]] 8/30/2011
plugin/inlineeditor.1320446294.txt.gz · Last modified: 2011-11-04 23:38 by rikblok

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki