example/app.js
function insertImage(map) {
    let src = map.selectNode().image.src;

    if (src === "") {
        let value = prompt("Please enter your name", "example/img/material-icons/add.svg");

        if (value) {
            map.updateNode("imageSrc", value);
        }
    } else {
        map.updateNode("imageSrc", "");
    }
}
function insertImage(map) {
    let src = map.selectNode().image.src;

    if (src === "") {
        let value = prompt("Please enter your name", "example/img/material-icons/add.svg");

        if (value) {
            map.updateNode("imageSrc", value);
        }
    } else {
        map.updateNode("imageSrc", "");
    }
}
function insertImage ( map ) { let src = map . selectNode ( ) . image . src ; if ( src === "" ) { let value = prompt ( "Please enter your name" , "example/img/material-icons/add.svg" ) ; if ( value ) { map . updateNode ( "imageSrc" , value ) ; } } else { map . updateNode ( "imageSrc" , "" ) ; } }
Insert an image in the selected node
Insert an image in the selected node