Git Product home page Git Product logo

Comments (6)

einhirn avatar einhirn commented on August 14, 2024

Look here in <DOKUWIKI_BASE>/lib/plugin/todo/action.php . Chose a letter you'd like to use and remove the //-comment for the second line... Then you can, depending on your OS use shift+alt+<letter> (Windows usually) or the corresponding Linux or Mac modifier-combination for web page hot keys...

Automatically generating like with (un)sorted lists will take more effort...

from dokuwiki-plugin-todo.

Whyglobaleyes avatar Whyglobaleyes commented on August 14, 2024

That's just incredible! thank you!! Thank you ever so much!!!

I set it to j for job, had to disable then enable the plugin to get it to activate but now it's perfect!!

The auto-generate seems a bit irrelevant and lazy now - I'm so happy with the accesskey shortcut.

EDIT

May I suggest that this is (set to a free accesskey and) uncommented by default? or perhaps made really prominent in the readme documentation?

I just went back to https://www.dokuwiki.org/plugin:todo and can see that it says:

QuickButton
A quickbutton for inserting todo syntax is available in the editor toolbar. You can click the button (which is pictured as a checked-checkbox) or you can use the keyboard shortcut of [T].

But I wouldn't have figured it out without Einhirn's guidance.

from dokuwiki-plugin-todo.

Whyglobaleyes avatar Whyglobaleyes commented on August 14, 2024

Apologies,
For interest's sake, in case it means more to the programmers on here ... I just got an answer on the dokuwiki forum with a different solution: https://forum.dokuwiki.org/d/20579-new-or-custom-accesskey-to-mark-a-todo-task :: on 24/10/22 Dodotori wrote:

I figured out how to do it:
open this file dokuwiki/lib/plugins/todo/script.js
then add this script into it

if (typeof window.toolbar !== 'undefined') {
toolbar[toolbar.length] = {
type: "format",
title: "Todo Button",
icon: "../../plugins/todo/todo.png", // located in lib/images/toolbar/
key: "6",
open: "",
sample: "Text between the tags",
close: "",
block: "false"
};
}
it will create a new toolbar button same as todo but with an accesskey 6

I just tested it and it works on my set-up ... so I have 2 ways of doing it!

from dokuwiki-plugin-todo.

zpartakov avatar zpartakov commented on August 14, 2024

thks, little + to add current date and user assign:

if (typeof window.toolbar !== 'undefined') {
var dateObj = new Date();
var month = dateObj.getUTCMonth() + 1; //months from 1-12
var day = dateObj.getUTCDate();
var year = dateObj.getUTCFullYear();
newdate = year + "-" + month + "-" + day;
toolbar[toolbar.length] = {
type: "format",
title: "Todo Button",
icon: "../../plugins/todo/todo.png", // located in lib/images/toolbar/
key: "6",
open: "\n<todo due:"+newdate+" @your_dw_username>",
sample: "todo",
close: "\n",
block: "false"
};
}

from dokuwiki-plugin-todo.

runout-at avatar runout-at commented on August 14, 2024

shall we close this or would a PR be welcome?

from dokuwiki-plugin-todo.

einhirn avatar einhirn commented on August 14, 2024

I'm not sure why the docs mention an access key and why there's commented out code for it, but it has to have a reason - probably because there are only so many letters available for access keys and other plugins also need some. Maybe the way to go would be to have an access key manager on dokuwiki level, so you can assign whatever access keys you like to whatever plugins you use - just like Thunderbird and/or Firefox seem to do it now. But that would be out of scope for this particular plugin.

I marked this one as a Question and think we should just leave it open for now.

from dokuwiki-plugin-todo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.