01512: Editing tables more easily: SectionEdit?

Summary: Editing tables more easily: SectionEdit?
Created: 2024-08-25 10:49
Status: Open
Category: Feature
From: Martin
Assigned:
Priority: 3
Version: 2.3.25
OS: php 5.6

Description: I would like a way to edit tables more easily. It's not about understanding the syntax, but about having an overview of large tables. I often have to edit such tables in an internal wiki. The request relates to both "simple tables" and "advanced tables"; I use both.

I think I've looked through the recipes. I tried "TableEdit" (https://www.pmwiki.org/wiki/Cookbook/TableEdit) intensively years ago and then discarded it because it was too insecure and unreliable. The recipe almost had the aspiration of WYSIWYG, and that's not even necessary.

The main problem is always finding the desired text section within a large table that I want to edit. By the way: I've tried PmSyntax, but it seems useless for this: in the editor window, the cursor position and the actual edited position don't match!

Question: Couldn't the functionality of SectionEdit be combined with the table syntax somehow? Because what I would really like is for every table cell to have a button that I could use to edit that cell alone.

With the "advanced" syntax, the combination with SectionEdit works reasonably well:

====

1891 ====

Text 1 ====

1907 ====

Text 2

This way, every cell has its own button and editing works.

My wishes:

1) Could this functionality be built into the table syntax so that it can be switched on by default (if required)? (The above solution is ugly: the buttons are always BEFORE the table cell that I want to edit.)

2) Could this functionality also be built into the "simple" table syntax - which I actually prefer to use?

I hope I haven't overlooked anything that already exists. But I think something like this would be a huge advantage in terms of user-friendliness. Martin

For now only a quick comment on your PmSyntax feedback. What skin is this? If the highlighted text block becomes misaligned with the editing textarea, it is likely that there are different styles forced on these 2 elements, could be fonts, line spacing, padding, margins, and dimensions, and these absolutely need to be the same. Recent PmWiki versions up to 2.3.37 continuously improve these cases as we uncover them or if someone reports them to us. If you could test the latest version with PmSyntax and report problems, I'd be happy to look into it. If the skin is on PmWiki.org, it will be even easier, as we always use the latest version (actually the nightly pre-release). --Petko

Tips on editing large tables. Combined with a working PmSyntax, this may be quite usable. --Petko

|| border=1
|| row 1 col 1 \
  || row 1 col 2 \
  || row 1 col 3 \
  || row 1 col 4 \
  ||
|| row 2 col 1 \
  || row 2 col 2 \
  || row 2 merged cols 3 and 4 \
  ||||
row 1 col 1row 1 col 2row 1 col 3row 1 col 4
row 2 col 1row 2 col 2row 2 merged cols 3 and 4

Thanks! I don't use a skin, or rather my own, with local.css. Sorry! I use PmWiki intensively, but I can't avoid tweaking it a bit here and there, and I'm often a bit behind on updates. So I don't think PmSyntax will work. - But thanks for the "Tips on editing large tables", the line structure does help a bit. (I use the form with PTVs and pagelists in other places, but it doesn't make sense here.)

You should never ever need to "tweak" the PmWiki core, every core function and feature can be overridden and replaced in Local Customizations, which will avoid losing your changes on upgrades or having to reapply them. If you don't find a switch or a hook that would allow you to make a specific change, just let us know and we'll add it. --Petko

I understand! When I have a lot of time, I'll send you the "skin(s)" I've made. I have CMS properties, but also very specific requirements for my internal area. I don't think it makes sense to "publish" it directly as a skin. I'm not going to drill into the core, by the way. - But one more thing: a button for every cell would probably be excessive. One button per line is certainly enough. Or: if I can insert the button myself using a small markup, I can decide, for example, to insert one every fifth line (similar to SectionEdit). Martin