Functions in Wiki Global

We expose various functions from core wiki-client javascript via functions bound in the global "wiki".

# Links

Following a link from title held in a variable. Second arg shows where it is to open.

page = $item.parents('.page') wiki.doInternalLink title, page

# Ghosts

Create a ghost page that can be used or saved.

const id = () => Math.random()*100000000000000000+'' let json = { title: 'Hello', story: [{ type: 'paragraph', text: 'hello world', id: id()}]} let pageObject = wiki.newPage(json, null) let $page = $item.parents('.page') wiki.showResult(pageObject, {$page})