DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:ckgedit:discussion_4

⇐ ckgedit Plugin Page

ckgedit Discussion Page 4

Switching editors

Is it possible to save the preferred editor per user? Novice users like to use ckgedit, but advanced users will prefer (the much better =) ) DokuWiki Syntax.

Not currently possible, not planned. — Myron TurnerMyron Turner
turnermm

2016-04-17 14:29
If you are using the current dokuwiki template, this will install an additional toolbar icon that opens the dokuwiki editor instead of the ckeditor: https://github.com/turnermm/dwedit/archive/master.zip. If you are using another template you can install the following in your template: action link. The drawback to these is that they do not support section editing. They load the entire document.

I'm using the last version of ckgedit (2016-04-17) and Dokuwiki 2015-08-10 “Detritus”.
When I create an internal link, the link doesn't work because it looks like “::var:www:dokudata:data::pages:infra:start”.
The link should be “infra:start” (or ':infra:start“). The part ”“::var:www:dokudata:data::pages:” is the data folder path : “/var/www/dokudata/data/pages/”. Why the part is added for internal link ?
When I create a link to a file or an image, the link looks like “:infra:systeme::2016-04_schema_serveurs.png” (and it works)

Is there a specific option for internal link ?
Thanks Pascal

Yes in the link dialog's drop-down menu.
Sorry I did not understand the answer. The question is : why a link to a file or an image works ( = link created looks like “:infra:systeme::2016-04_schema_serveurs.png”) but the internal does not ( = the link is not created correctly) ? - Pascal
Here is a short video which shows how to create internal and media links. If you are doing this and not getting correct results, then there is some misconfiguration in your setup: https://www.youtube.com/watch?v=Jc_wzayCLFY
When I posted my question, I used plugin _ckgEdit-ckedit_457-16-Mar_04-12_06, with the problem I described (internal link looks like “::var:www:dokudata:data::pages:infra:start” instead of “:infra:start”)
With Firefox 46, the editor stops displaying on my wiki. So I updated the plugin (now using _ckgEdit-ckedit_457-16-May_10-19_45).
Now when I add an internal link, it looks like “:start” instead of “:infra:start”.
More, inserting picture stops working now : when I use the file browser, the picture appears as broken (even with pictures already in use in current pages)
It could be a misconfiguration in my setup but can you tell me what to check because I do not understand which configuration is about the link construction.
I am having trouble following this. But try to clear your browser's cache, also try using another browser. If this persists, I will need a lot more information than you are giving me.

URL Encoded characters in URL's being mangled

We are running dokuwiki release 2015-08-10a “Detritus”, and ckedit_457-16-Apr_17-20_37. We are seeing ckgedit (but not dwedit) mangle URL's with encoded characters in them. If a URL has an encoded character, we are seeing that encoded character basically being removed, rendering the URL unusable. Here is the URL specifically that we first noticed it with (although we've tested some others) http://server2:57772/csp/sys/%25CSP.Portal.Home.zen

This should be fixed in the current update. — Myron TurnerMyron Turner
turnermm

2016-05-02 22:49

A way to get the pagename in frmfolders.html?

I want to have all media in one Folder with a Folder for each Page. I changed it that way that the user get into the mainfolder directly. But i want them directly in the Folder of the Page. How can i get the pagename in “frmfolders.html” or is there a other way to make that Change. (i added the path at line 95). Sorry for my bad english Thank you (23.5.2016 16:40)

Solved: ckgedit/action/meta.php → delete line 500 (“ array_pop($elems); ”)
then edit ckgedit/fckeditor/filemanager/browser/Default/frmfolders.html after line 93 (only if you dont want the same Folder structure for the mediafiles like me, i have the Folder “Pictures” witch includes all Folders for each page)
What is the edit to frmfolders?
If you want to have the Folders like the namespaces like: en:doku:page1 → en/doku/page1 and the direct Access to the Folder page1, then you dont have to Change something. My changes are:
var myparts = res.split(“/”);
var mypath = “/it-doku/pictures/”+myparts[myparts.length-2]+“/”;
LoadFolders(mypath);
i added/edit this after that if/else where res get “/” to the beginn and to the end. (line 94)
But i got a new Problem through this: Now that Folder is the startfolder from the Internal link Option too. I try to solve this at the moment
I solved my Problem, now i can set different start Folders for insert Picture and insert internal link in the filebrowser. Here is my Code: (Path starts with dokuwiki/lib/plugin/ckgedit)

action/meta.php

  500            $elems = explode(':', $ID);
  501            //array_pop($elems);
  502
  503            $_SESSION['dwfck_ns'] = implode(':',$elems);
  504            $_SESSION['dwfck_top'] = implode('/',$elems);
  505            $_SESSION['dwfck_del'] = $this->getConf('acl_del');

/fckeditor/editor/filemanager/connectors/php/commands.php

   33 function GetDwfckNs($mytype)
   34 {
   35 if($mytype == "Image"){
   36         $myelems = explode(":",$_SESSION['dwfck_ns']);
   37         $mypagename = array_pop($myelems);
   38         $mypagename = "it-doku:pictures:".$mypagename;
   39         echo $mypagename;
   40 }else{
   41         $myelems = explode(":",$_SESSION['dwfck_ns']);
   42         array_pop($myelems);
   43         echo implode(":",$myelems);;
   44 }
   45 }

/fckeditor/editor/filemanager/connectors/php/connector.php

   83         if ( $sCommand == 'GetDwfckNs' )
   84         {
   85                 GetDwfckNs($sResourceType);
   86                 return;
   87         }

/fckeditor/editor/filemanager/browser/default/frmfolders.html

   64 function GetCurentFolder()
   65 {
   66         httpObject = getHTTPObject();
   67         if (httpObject != null)
   68         {
   69                 var myType = window.parent.location.href;
   70                 var myTypeRes = myType.match("Type=(.*)&Connector");
   71                 httpObject.onreadystatechange = GetCurentFolder_from_Request;
   72                 httpObject.open("GET", '../../connectors/php/connector.php?Command=GetDwfckNs&Type='+myTypeRes[1]+'&CurrentFolder=nothing', true);
   73                 httpObject.send(null);
   74
   75         }
   76 }

Internal link: clear rows with Internet Explorer

when i use the Server browser to create a internal link, there are clear rows like one row for each page. The clear rows are above the Pages. So that it is a big Problem, because in one of the namespaces you have to scroll down bevor you see a pagename. And its just in Internet Explorer but not in Edge

I don't follow this. Is this still part of the above issue: pagename in frmfolders? — Myron TurnerMyron Turner
turnermm

2016-05-25 15:50
its not the same issue i just saw that while working on the issue above. i thought that this was my fault because of editing the files but i reinstalled the Plugin an i have still this Problem.
I still don't understand the problem about clear rows. If you mean blank rows between page names, I've never seen that in any browser.
Sorry i dont know how to explain it in english but i try: when i want to insert a internal link, i use the filebrowser. there are the pages in Folders and if you are in a Folder where are pages it Displays the pages in rows like this in a window:
xxxxxxxxxxxxxxxxxxxxxxxx
Page1 Size Date
Page2 Size Date
Page3 Size Date
xxxxxxxxxxxxxxxxxxxxxxxx
But with the IE it Looks like this
xxxxxxxxxxxxxxxxxxxxxxxx



Page1 Size Date
Page2 Size Date
Page3 Size Date
xxxxxxxxxxxxxxxxxxxxxxxx
and it Looks like there is one row without a pagename, text or something for each page in this Namespace
I cannot reproduce this. I have run it in IE 11 on Windows 7 and Edge on Windows 10. There are many versions of IE and you don't say which you are using. But see https://www.dokuwiki.org/browser?s[]=internet%20explorer. IE is not the recommended browser for use with Dokuwiki.
Thank you for helping, but it solved on his own today. Maybe i had to restart -.- :D
I found what causes the error: Win 10 IE 11 (maybe the changes above but i dont think so) and when you dont have the permissions to upload and delete in the Pagefolder/Namespace. In the root-ns i gave full permissions but in the namespaces behind this the user didnt got upload and delete. After i changed it, the Problem disapears. (i use admin acc and a normal account to test most Things ) I dont know if there are more Problems that all together causes that or that just my config did this Problem

Please implement: copy'n'paste webpage containing images auto-upload the images

I use dokuwiki as a personal knowledge management system, I feel good except that I have to copy'n'paste images manually which embedded in useful webpages I want to save into dokuwiki. I do that job via ImgPaste Plugin1) I know via Ckgedit Plugin I can paste webpages containing images, but the images still hosted in external server, instead of uploading to dokuwiki automatically like what ImgPaste Plugin does. Hosting images locally has great advantages IMO (e.g. super fast to open a page, no need to worry about the external images unavailable for some reasons…). I always dream of copy'n'paste a webpage to dokuwiki and everything is done, both formatted text and images just are there, lying in my disk. Ckgedit Plugin is what I can find closest to my dream. Please implement this, thanks!!

See https://www.dokuwiki.org/plugin:ckgedit:drag_and_drop
Thanks for reply. I've been using the drag_and_drop feature, which is very handy for upload images from disk to dokuwiki. But this is different from what I said above copy'n'paste webpage containing images auto-upload the images. For instance, when I'm browsing https://www.dokuwiki.org home page, I want to save the webpage into my own local dokuwiki as a page, then I do copy'n'paste or drag_and_drop and Save, both webpage and images are shown, but, the images are still hosted in dokuwiki.org server rather than in my own local dokuwiki. What I want is CKGedit upload the images automatically to my own local dokuwiki. Thank you for reading.
I'll take this as a feature request. — Myron TurnerMyron Turner
turnermm

2016-07-07 15:34
I've had time to think about this and don't believe it's workable. Dokuwiki allows for users to link to external images and so there would be no convenient way to distinguish between those images and images found in a pasted document.

mingled urls in rss

Probably not an issue of CKGedit, but definitely related to it is this: When switching from CKGedit to DWedit, the urls in rss blocks are modified (or broken), e.g.

{{rss>http://www.kbv.de/html/pressemitteilungen.xml 5 2h date}}

becomes

 {{rss>http://[[http://www.krankenkassen-direkt.de/rss/gkv-news.xml|www.krankenkassen-direkt.de/rss/gkv-news.xml]] 5 2h date}}

which obviously doesn't work anymore. (In case this is the wrong point to bring this issue up, please feel free to move it to the right place.)

Fixed in current update — Myron TurnerMyron Turner
turnermm

2016-08-24 14:19
thank you!

can't save after pasting tables from word or excel

pasting works and it looks visually good but when i want to save i get a parse error in console. the table is really simple and not complex.

this how it looks in ckgedit source code

<table border="0" cellpadding="0" cellspacing="0" width="162" x:str="">
	<tbody>
		<tr height="20">
			<td height="20" width="162">f, f</td>
		</tr>
		<tr height="20">
			<td height="20">f, f</td>
		</tr>
		<tr height="20">
			<td height="20">f, f</td>
		</tr>
	</tbody>
</table>

and this is the parse error in chrome. i must remove the table for being able to save again.

js.php?t=bootstrap3&tseed=b00cc1e…:23 Uncaught Parse Error: <table border="0" cellpadding="0" cellspacing="0" width="162" x:str="">
	<tbody>
		<tr height="20">
			<td height="20" width="162">f, f</td>
		</tr>
		<tr height="20">
			<td height="20">f, f</td>
		</tr>
		<tr height="20">
			<td height="20">f, f</td>
		</tr>
	</tbody>
</table>

Any idea? on the other side i can paste a html table from sharepoint page for example into ckgedit and it works. as a workaround i have installed edittable plugin. then move from ckgedit to DW Edit and by opening the table with editable plugin i could paste content into table. but this plugin is really slow and not autoadding cols or rows so would be great if ckgedit would work with tables.

Are you using the Paste from Word tool at the upper right of the toolbar? — Myron TurnerMyron Turner
turnermm

2017-01-25 21:00

Uploading all kind of files with the "picture" button

Is it possible to change the behaviour of the “picture” upload button to the way it workes in the original editor? When I upload a pdf, I have to use the “Link” button which confuses quite some people. When I try to upload a pdf with the picture button, I get the message “Invalid file type”. It would be nice, if also other documents could uploaded in this easy way. Thanks a lot for your great editor.

You can try ckgdoku. It adds to ckgedit the option of using the Dokuwiki media manager and linkwiz, instead of using the ckgedit file browser. With the configuration options you can choose which set of file browsers has priority, ckgedit's or dokuwiki's. — Myron TurnerMyron Turner
turnermm

2017-01-30 15:53

2/20/2017 Today there was an update for ckgedit. I updated. Now there is are two messages “ Plugin ckgedit updated successfully

unable to create image link: /home/szlhykiz/public_html/wiki/dokuwiki/lib/plugins/ckgedit/fckeditor/userfiles/image

unable to create file link: /home/szlhykiz/public_html/wiki/dokuwiki/lib/plugins/ckgedit/fckeditor/userfiles/file”

There was an error when trying to create symbolic links in /home/szlhykiz/public_html/wiki/dokuwiki/lib/plugins/ckgedit/fckeditor/userfiles/. See ckgedit/auto_install.pdf or the fckgLite web site

Is there something I should do?

Is the media manager working? If so, ignorethe messages, There was a permission error or else your system does not allow the creation of symlinks. These links are not needed if you are using Windows. If you are using a unix OS, then change over to the winstyle setup: plugin:ckgedit#file_browser or create the symlinks manually (these is explained in the documentation for fckglite which the plugin:ckgedit#file_browser links to).
1)
authored by Andreas Gohr, Add images via cut'n'paste in Chrome or Opera. The image will automatically be uploaded and the image syntax is inserted at your current cursor position.
plugin/ckgedit/discussion_4.txt · Last modified: 2017-02-20 15:19 by turnermm