Mind Maps Scripts
30 august 2021
UPDATED: see plugins
What are mind map script for?
To create unique functionality. For example:
- Inserting current date
- Insertion of synonyms
- And anything else you need
How to add a plugin to a mind map?
- Download a plugin to your computer
- Open a mind map and press
~
- Select the downloaded file by the button
Where can I get a script?
Send us an email to info@ivvi.dev or add a comment below with your task
(script mission, screenshots, text, etc).
How can I make a script myself?
1. Create a file script-name.vue
.
2. Add content to the file like below:
<!--
PluginName: __SCRIPT_NAME__
PluginUrl: __URL_WHERE_OTHER_USERS_CAN_DOWNLOAD_THE_SCRIPT__
-->
<!-- Libraries (if need) -->
<script src="__URL_OF_LIBRARY_JS_FILE__"></script>
<!-- Main Script -->
<script>
// On Key Down
ioctopus.$on("keydown", e => {
// Alt + Shift + N
if (e.altKey && e.shiftKey && e.code === "KeyN") {
// Get Selected Branches
const selectedBranches = ioctopus.getSelectedBranches();
// Each branches
for (let branch of selectedBranches) {
// Change the branch content
let text = branch.getText();
// Change the text as you want
// (you can use html)...
text = `<span class="my-style">${text}</span>`;
branch.setText(text);
}
}
});
</script>
<!-- Styles -->
<style>
.my-style {
color: green;
}
</style>
ioctopus
- is the main object of the mind map
Main Events
ioctopus.$on('EVENT_NAME', callback);
Available events:
- keydown
- keypress
- keyup
- context-menu
Context Menu
// On Context Menu
ioctopus.$on('context-menu', contextMenu => {
// Add to the Context Menu new Button
contextMenu.add({
label: "Button text", // Button Text
icon: "fas fa-list-ul", // Button Icon
keycode: "Alt+Shift+L", // Dysplayed prompt
click: () => { // Button action
// Code running on click
},
href: "https://...", // Button url (when no Button action)
target: "_blank", // Open Button url in new window (tab)
});
});
Where can I get icons?
From fontawesome.com.
For example, copy this code from this page.
Branches
Get selected branches:
const selectedBranches = ioctopus.getSelectedBranches();
Get text of a branch:
let branchText = branch.getText();
Set text to a branch:
branch.setText("<span>You can use html</span>");
Add a child branch:
branch.addChild({
content: {
text: "My new branch",
}
});
Show/hide branch loading:
branch.loading();
branch.loadingStop();
Do you want more functionality?
Email us at info@ivvi.dev.
How safe are these scripts?
What if, for example, some hacker adds a script to my account and steals my cookies?
We understand that.
That's why we invest so much time to protect our server.
Also, our server has no access to your scripts.
Scripts are only located in your browser.
This is why only people with access to your browser can add a script to your account.
See also
When it makes sense, we break the design rule: "everything should be obvious in the interface". But what would be the point of that?