quickadd icon indicating copy to clipboard operation
quickadd copied to clipboard

[BUG] QuickAdd API wideInputPrompt doesn't handle \n right

Open gensmusic opened this issue 8 months ago • 0 comments

Describe the bug I use inline script and wideInputPrompt to handle multiple lines code. the scripts is

```js quickadd
const codeInput = await this.quickAddApi.wideInputPrompt("please input your code");
const code = codeInput.trim();
return code
```

Then I use this wide input and typo some code as follows

let str = "aa\nbb";
let d = 1;

but I got

let str = "aa
bb";
let d = 1;

Expected behavior This is expected to see

let str = "aa\nbb";
let d = 1;

Screenshots If applicable, add screenshots to help explain your problem.

the input prompt Image

the result Image

Desktop (please complete the following information):

  • OS: MacOS
  • Browser chrome 135.0.7049.85
  • Version obsidian 1.8.9. quickadd 1.13.2

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context Add any other context about the problem here.

gensmusic avatar Apr 21 '25 06:04 gensmusic

To further improve this functionality, i'd also like a toggle for a deck per file aswell.

BlitzVI avatar Apr 21 '25 13:04 BlitzVI