External tools and scripts for Kanka - Salvatos/Kanka-Cookbook GitHub Wiki
External tools
- Kanka Attribute Templates Designer by MaxJohnson: A rough and messy local workspace to approximate Kanka's layout and css capabilities for attribute template development. Uses JavaScript to replace some of the Blade logic with placeholder text to assist in developing and testing your template’s layout locally.
- Kanka Ruler Calculation by BrandonEchols & The Quacken: Figure out what value to input for the map measurement setting based on your image's dimensions and desired metric.
- Tag the Untagged by Kelaos: An API-based utility that adds a specified tag to all of your untagged entities so you can track them down more easily.
- Kanka-Wordcount by Kuskus: A Typescript utility that computes the word count of your campaigns, supporting various options and filters. Installed and run locally via NPM.
Discord Integrations
-
kanka-discord by Fallayn: A bridge that automatically posts Kanka changes to a Discord channel.
-
kanka-view by Arconyx: A Red-DiscordBot cog that allows you to access your Kanka campaigns from Discord.
User scripts
The links that follow will take you to various Tampermonkey scripts designed specifically for Kanka. Those scripts are extensions that can be installed in your browser to give you additional features without affecting the actual website for other users.
Automatic Table of Contents
Automatically adds a Table of Contents block under the Pins sidebar of any entity on Kanka, with clickable links to each heading and optional "back to top" links. It integrates seamlessly with any official theme and can be customized further using campaign CSS.
Custom Keyboard Shortcuts for Summernote
A customizable script to help you replace the key bindings for Summernote’s keyboard shortcuts.
Custom Spectrum Palette
Modifies Spectrum color pickers to offer the user’s selection of preset colors instead of the handful of defaults, and makes it possible to enter values directly in the field under the color picker. This applies to forms such as Events, Relations and Map Markers.
Entity Privacy Setting on the Entry Tab
Makes the entity Privacy checkbox visible on both the Entry and Permissions tabs, so you don’t need to leave the main tab to make an entity private, but the setting also appears with the rest of the permission settings.
Gallery Alphabetical Sort
Sorts folders and images alphabetically in the Kanka Gallery, keeping folders first.
HTML Beautifier for Summernote
This simple script processes the HTML code of your Kanka entries every time you switch to Summernote's code view in order to add line breaks and indentation and make the code more legible.
Jump to Post
A nifty little script that adds an unobtrusive dropdown menu next to the Collapse All and Expand All post controls in entity headers, allowing you to quickly scroll down to the selected post (with optional "back to top" links).
Map Path Helper
Adds a button to the polygon marker editor in Kanka maps that manipulates coordinates in the text field in order to turn them into a single line. For example, you can click any three points on the map and activate the Helper to end up with a continuous line instead of an enclosed triangle.
Marketplace Toolbar for Summernote
Adds buttons to the Summernote editor toolbar that can be used to insert HTML elements or classes required by various Marketplace themes with a simple click. You will no longer need to memorize or look up the code, nor to type it all in or copy-paste it into the editor. Just select the plugin (and variant, if applicable) to insert the appropriate code, and customize it further if needed. Most features are compatible with both the visual and code editors, and you can also set up your own classes and HTML snippets in your campaign’s styles.
Mention Previewer
Allows viewing mentioned entities in a modal that contains the full entry, posts, pinned attributes and images, without leaving the current page.
Search Upgrades
Adds another link to search bar suggestions as you type. Said link will take you the Search page to look for your input in entity content rather than limiting itself to titles. Optionally, you can also use this script to quickly find campaign or user settings without navigating through the interface.
Subpage Elements Counter
Shows the count of attributes, relations, assets, etc. on each entity's corresponding submenu item.
Summernote Code View to the Top
A simple script that sets the cursor position to the start of the input field rather than the end when switching to Code View in the Summernote editor, which is more consistent with what happens when you switch back to the visual editor.
Ideas and work in progress
- The JSON Export option could be used to fetch limited additional data from an entity and display it on its front page (and/or display front page content in its subpages).
- I’m considering using the above to add an entity’s entry to the new search pane’s result preview.
Retired scripts
Advanced Mention Name Reminder
Showed advanced mentions’ target entity name in Summernote in superscript or in a tooltip for easier editing. Reimplemented as a purple tag in Kanka 1.31.
Campaign CSS Splitter
A precursor to the new Theming area of Kanka, that allowed a user to split their campaign CSS into multiple form fields, with the ability to name and reorder sections, all while providing syntax highlighting.
Copy Post With Title
Changes the behaviour of the "Copy advanced mention" option on your Kanka entities’ posts to display the post’s title rather than the parent entity’s title. Kanka now offers both options out of the box.
HTML Inserter for Summernote
An earlier iteration of the Marketplace Toolbar that only inserted predefined code snippets.
Summernote code view save fix
Fixes the Summernote bug where saving from Code View discards any changes made since last viewing the visual editor. Implemented into Kanka itself in v.1.14!