Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add new option custom_node_render to support vary rendering logic #531

Merged
merged 2 commits into from
Nov 13, 2023

Conversation

hizzgdev
Copy link
Owner

Add new option custom_node_render to support vary rendering logic.

Now, It's possible to customize your rendering logic for specific node.

let options = {
    ...
    view: {
        custom_node_render: function (jm, element, node) {
            // any customized logic
            let updatedTopic = '<img src="">'+node.topic;
            element.innerHTML = updatedTopic;
            // return true to tell jsMind the node has been rendered
            return true;
        }
    }
}

@hizzgdev hizzgdev marked this pull request as ready for review November 13, 2023 04:14
@hizzgdev hizzgdev merged commit 8ef4d9b into master Nov 13, 2023
3 checks passed
@hizzgdev hizzgdev deleted the features/node-render branch November 13, 2023 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant