Safe title attribute of draft (for scripting)

It would be lovely if we could get the safe title attribute, as well as the other elements already available (detailed here).

This would help with consistency when using the safe title element via other actions.

The template engine is available in script and can handle things like this nicely and is guaranteed to be consistent with results of templates in other steps, like:

let safeTitle = draft.processTemplate(“[[safe_title]]”);
// or ...
let fileName = draft.processTemplate(“Project-[[safe_title]].markdown”);

Not necessarily arguing against additional properties, just pointing out they may not be necessary and using templates can often save string concatenation steps in script as well.

1 Like

I did not realise that was that and it will work perfectly for my needs! Perhaps an additional example on the draft documentation page wouldn’t go amiss to highlight that feature? I confess, I completely missed it! :blush: