quickadd icon indicating copy to clipboard operation
quickadd copied to clipboard

[FEATURE REQUEST] Create From Canvas

Open sarantsatsral-qy opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe. So far, the choice is template, capture, macro, and multi...

Describe the solution you'd like Can we have a canvas template next? At least to generate the title.

Additional context Thank you so much! I like your plugin very much, in fact, my quickadd .json right now is 1,138 kilobite, and it has hundreds of commands!

sarantsatsral-qy avatar Dec 08 '22 05:12 sarantsatsral-qy

@sarantsatsral-qy There is a workaround, you can create a Templater template with the following script.

<%*
// create a new canvas
await this.app.commands.commands['canvas:new-file'].callback()

// get the createted file
const file = await this.app.workspace.getActiveFile()

// ask for a new name
const name = await tp.system.prompt('Canvas Name', 'New Canvas')

// rename and move canvas
this.app.fileManager.renameFile(file, 'Canvas/' + name + ' (Canvas).canvas')
%>

juicybox avatar Apr 20 '23 21:04 juicybox

@sarantsatsral-qy There is a workaround, you can create a Templater template with the following script.

<%*
// create a new canvas
await this.app.commands.commands['canvas:new-file'].callback()

// get the createted file
const file = await this.app.workspace.getActiveFile()

// ask for a new name
const name = await tp.system.prompt('Canvas Name', 'New Canvas')

// rename and move canvas
this.app.fileManager.renameFile(file, 'Canvas/' + name + ' (Canvas).canvas')
%>

Thanks, I'm having a similar problem, and seeing your reply, there seems to be hope for a solution.

I am trying to use Canvas in my reading notes, and use QuickAdd to quickly create notes of different books. I would like to ask how this method can be combined with the existing template of QuickAdd to create a new canvas file based on the canvas template?

MugenLee avatar Jul 21 '23 16:07 MugenLee