I found a problem with an automatic TOC which is inserted right before the first heading in the page -- it separates the "sectionedit" link from the heading.

I've implemented a workaround for the next version.

You can get and test the pre-release from Subversion or download it as a ZIP archive from the ChangeLog page -- only pmwiki-utils.js changed for this fix.

Here is how to make both features work successfully with the latest pmwiki-utils.js.

For SectionEdit, enable $SectionEditHeaderLinkSpan:

  $SectionEditHeaderLinkSpan = true;

Optionally, if you want the "(Edit)" links to float to the right side, and to be smaller in size than the headings, add to pub/css/local.css, instead of the code I suggested earlier:

  span.sectionedit { float: right; font-size: .9rem; }

In a wikifarm, instead of local.css, you can add to farmconfig.php:
$HTMLStylesFmt['float-sectionedit'] = 'span.sectionedit { float: right; font-size: .9rem; }';

Petko

On 22/11/2019 13:05, Petko Yotov wrote:
I now see a problem, as the TOC is inserted just before the first
heading, it pushes it down and separates it from its edit link. Let me
think about it.

Petko

On 22/11/2019 12:59, Petko Yotov wrote:
You can add to pub/css/local.css this line:

  div.sectionedit { float: right; }

Alternatively, if you have a wikifarm, to apply this to all fields,
you can add in pmwiki/local/farmconfig.php:

$HTMLStylesFmt['float-sectionedit'] = 'div.sectionedit { float: right; }';

This is without any configuration, so I assume it is like
$SectionEditHeaderLinkSpan = false;

Petko


--
If you upgrade :  http://www.pmwiki.org/Upgrades


On 22/11/2019 11:20, Johan Bengtsson wrote:
I have tried using PmToc and SectionEdit together, and in general this
works well. This is with the pmwiki-responsive skin and pmwiki
2.2.120.

Two things that I have noticed:

With $SectionEditHeaderLinkSpan = false;, when clicking on a link in the toc
I will end up just below the Edit link for the section, so if I want
to click on it I will have to scroll up a bit.

With $SectionEditHeaderLinkSpan = true;, the above problem is gone.
But now "Edit" appears at the end of every link in the toc. Is there a
way to prevent that?

_______________________________________________
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

_______________________________________________
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to