You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/knowledgegraph/util.js

17 lines
473 B

function isValidUrl(str) {
const reg = /^((https|http|ftp|rtsp|mms)?:\/\/)(([A-Za-z0-9]+-[A-Za-z0-9]+|[A-Za-z0-9]+)\.)+([A-Za-z]{2,6})(:\d+)?(\/.*)?(\?.*)?(#.*)?$/;
return reg.test(str);
}
function openNewWindow(url) {
window.open(url);
}
const $ = go.GraphObject.make;
let editable = false;
const diagramWrapperDom = document.getElementById('myDiagramDiv');
const editButton = document.getElementById('editbtn');
const tipsDom = document.getElementById('tips');