editorjs-viewer
Advanced tools
Comparing version 1.0.3 to 1.1.3
@@ -26,4 +26,4 @@ const { | ||
break; | ||
case "link": | ||
value += link(items.data.link) | ||
case "linkTool": | ||
value += link(items.data) | ||
break; | ||
@@ -30,0 +30,0 @@ case "Header": |
const link = (param) => { | ||
return `<a href='${param}' target='_blank'>${param}</a>` | ||
const domain = param.link.split('/') | ||
const selected_domain = domain[2] | ||
return ` | ||
<a href='${param.link}' class='linkTool'> | ||
<h4>${param.meta.title}</h4> | ||
<p>${param.meta.description}</p> | ||
<small>${selected_domain}</small> | ||
</a>` | ||
} | ||
module.exports = link |
{ | ||
"name": "editorjs-viewer", | ||
"version": "1.0.3", | ||
"version": "1.1.3", | ||
"description": "easy change json data to html from editorjs", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8060
200