diff --git a/component-models.json b/component-models.json index 48e355adc6..36188d2914 100644 --- a/component-models.json +++ b/component-models.json @@ -611,19 +611,6 @@ "value": "", "label": "Offer documents image", "description": "Sets the image of the documents." - }, - { - "component": "multiselect", - "name": "multiselect", - "label": "Rel Added", - "valueType": "string", - "options": [ - { "name": "noopener", "value": "noopener" }, - { "name": "noreferrer", "value": "noreferrer" }, - { "name": "nofollow", "value": "nofollow" }, - { "name": "dofollow", "value": "dofollow" }, - { "name": "noindex", "value": "noindex" } - ] } ] }, diff --git a/scripts/scripts.js b/scripts/scripts.js index ebee22f6f5..92f138675c 100644 --- a/scripts/scripts.js +++ b/scripts/scripts.js @@ -541,6 +541,16 @@ export function decorateAnchorTag(main) { }); }); } + + // Rel Tags + if(anchor.textContent.trim().includes("~")){ + let mainAnchor = anchor.textContent.trim().split('~'); + anchor.innerText = mainAnchor[0]; + anchor.setAttribute('title', mainAnchor[0]); + let relTags = mainAnchor[1].replace(',', " "); + anchor.setAttribute('rel', relTags); + } + }); } catch (error) { console.warn(error);