inkle / inky

An editor for ink: inkle's narrative scripting language
http://www.inklestudios.com/ink
2.42k stars 296 forks source link

Multiline custom ink snippets #425

Closed LutzDev closed 2 years ago

LutzDev commented 2 years ago

Hello, Is it possible to define multiline custom ink snippets?

Example (setting.json):

 "customInkSnippets":[
  {
     "name":"Category name",
     "submenu":[
         {
            "name":"Snippet name",
            "ink":[ // <-- Each row is mapped as an entry in an array.
                "first line of snippet"
                "second line of snippet"
                "third line of snippet"
            ]
         },
    ]
 }
]

Expected output when the snippet is used

=== section name ===
first line of snippet
second line of snippet
third line of snippet
LutzDev commented 2 years ago

Got it.

"customInkSnippets":[
  {
     "name":"Category name",
     "submenu":[
         {
            "name":"Snippet name",
            "ink": "first line of snippet \n second line of snippet \n third line of snippet"
         },
    ]
 }
]