Closed SirDoctorK closed 2 years ago
The way to do this is to first create your table in the Ckgeditor and then embed it between the HTML BLOCK macros, as described in the ckgedit documentation. This will preserve the table as HTML and on reloading you can make whatever changes you need to the data and the table structure.
It seems that this workaround requires changing the table to HTML syntax instead of DokuWiki syntax manually. After enabling htmlok
in DokuWiki settings, and adding the tags in the CKG editor as shown in the documentation, it just deleted the whole section.
Is a fix for this in progress? Requiring a workaround to avoid breaking standard DokuWiki syntax isn't a great experience...
It seems that this workaround requires changing the table to HTML syntax instead of DokuWiki syntax manually.
No. Create your table using ckgedit's tools. Enclose it in the macros and save. Or create it in the Dokuwiki editor, enclose it in the macros and save. You do not code your own HTML.
The latter method was the way this was done: http://mturner.org/xen_server_igor/wiki/html_blocks
I see. Neither of those work on my system, despite having htmlok
checked in the DW config. I've also verified that the example table you linked renders correctly if I copy it into the DW editor so it looks like the HTML block is working.
However, enclosing the DW-style table source in the HTML block just causes it to be shown in plain text. And adding the block to an existing or newly created table with CKG just deletes the whole section I was editing.
Sorry. My previous post was not entirely correct. Or at the very least misleading. The blocks, as the name implies, are meant to mark off blocks of HTML, whichever editor is in use. But they are not designed to be used to mark off HTML code that you enter directly into the ckgedit editor. I’ve never tested it. But with htmlok set to true, you can enter HTML into the D-W editor. The plugin page gives an example of using it in the Dokuwiki editor. I am not sure what difference your system would make. I’ve used it on both Unix/Linux systems and Centos, with PHP versions starting with 5 and through 8.
Thanks for the clarification. Is the CKG editor intended to generate the HTML for tables created with it? And is a proper fix for complex tables in the CKG editor in the pipeline?
The Ckeditor is a modern browser application. It's engine is JavaScript. When you save a page ckgedit saves it as Dokuwiki markup. And when you load a page from the server, ckgedit inserts into the editor the HTML output by Dokuwiki. That's the short story.
Complex tables are already supported. It would be great if someone with more patience and skill would refactor the code.
That makes sense. What doesn't make sense is why it's messing up the conversion from the editor to DokuWiki markup. Is the behavior I described consistent with what you see?
That makes sense. What doesn't make sense is why it's messing up the conversion from the editor to DokuWiki
Complex tables are probably the most difficult feature for the parser to deal with. Which is why I suggested HTML blocks. Unfortunately they do not translate back to Dokuwiki markup. Or use an include
DokuWiki's table syntax allows for rowspans - vertically connected cells - with
:::
as the cell contents. If this is used on multiple columns, it confuses the CKG editor.If the editor is used on a section that contains such a table, even if the edit is cancelled without saving, the second instance of the rowspan is swapped with the cell after it in the same row.
The editor gets even more confused if it is used to create such a table - it completely blanks and removes the edited section entirely, even content that existed before the editor was opened.
Verified on two different DokuWiki servers.
Example page:
DW source for example page: