Skip to content

jefs42/secedit2head

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

secedit2head

DokuWiki plugin to move section edit buttons from bottom to section header

General Info

Having the section edit button below each section added more space between sections than I wanted for my project. Some CSS of course would work, but relocating it to the same line as the section header seemed a more logical solution. Not only will it now occupy space already used for the section title, but for long pages with long sections, it also makes it quick and easy to go to top of section (say, via ToC) and have the Edit option right there.

Details

The plugin adds Javascript inline at the end of page content creation. It then runs two checks for (default DokuWiki config) deferred Javascript loading.

  • first, that jQuery has loaded
  • second, that DokuWiki's page.js has run the code that creates the section wrappers

It only then copies and removes the original edit node and prepends it to the h# section heading. All structure, ids, classes are kept in tact. Hover events for section_highlight are updated for the change in location to correctly find the parent wrapper to highlight on hover.

Before

Before

After

After

About

DokuWiki plugin to move section edit buttons from bottom to section header

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages