Skip to content

Access API and pre-fill text #348

@ObjectiveTruth

Description

@ObjectiveTruth

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
I'd like to use quickadd in conjunction with this plugin where I can select froma list and that selection will be interpolated into the create task modal that is available through this plugin

Describe the solution you'd like
A clear and concise description of what you want to happen.
being able to access via app.plugins.plugins["todoist-sync-plugin"] like

<%*
const plugin = app.plugins.plugins['obsidian-todoist-plugin'];
const todoistApiClient = plugin.apiClient;

const taskContent = 'Your task content here';
const additionalContent = 'Additional content here';

async function createTodoistTask() {
  try {
    await todoistApiClient.createTask(`${taskContent} ${additionalContent}`);
    new Notice('Task created successfully');
  } catch (error) {
    console.error('Error creating task:', error);
    new Notice('Error creating task');
  }
}

createTodoistTask();
-%>

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Don't really have any other alternatives

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ✨ featureNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions