Flying Meat

Page Meta

VoodooPad has a feature that lets you set arbitrary keys and values on a page, which can the be used later on in script plugins or triggers.


To add meta values for a page, bring up the Page and Document Inspector and select the "Page Meta" tab.


Pasted Graphic.tiff


Scripts and Triggers

Meta values will be useful for you when combined with triggers or script plugins. Here's an example of a script plugin that uses a meta value named "todo" given to certain pages. It searches through all the pages in a document, finds the ones with the "todo" meta value set, and inserts those names in the current page.


textView = windowController:textView()

list = "My todo pages list:\n"

for key in objc.values(document:keys()) do

page = document:pageForKey(key)

if (page:metaValueForKey("todo") ~= nil) then

    list = list .. page:displayName() .. "\n"

end

end

textView:insertText(list)





ยป Back to the start page or Download this site as a VoodooPad document