-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
When use Bold and italic in link it is duplicate the link text #290
Comments
Yes It's apply on P tag that is working fine. but when you select link and apply bold on it. it will create a new bold text not apply on link.
|
Still fine me. <p>Here is some <strong><em>bold and italic</em></strong> content</p>
<p><a href="https://google.com">Here is some <strong><em>bold and italic</em></strong> content</a></p> But if you're custom rendering (I thought you mentioned just using <p class="text-base font-normal leading-8 mb-10">
{% for nodeContent in node.content %}
{% for mark in nodeContent.marks %}
{% if mark.type == 'link' %}
<a {{ attr(mark.attrs) }}>
{% elseif mark.type == 'bold' %}
<strong>
{% elseif mark.type == 'italic' %}
<em>
{% endif %}
{% endfor %}
{{ nodeContent.text }}
{% for mark in nodeContent.marks %}
{% if mark.type == 'link' %}
</a>
{% elseif mark.type == 'bold' %}
</strong>
{% elseif mark.type == 'italic' %}
</em>
{% endif %}
{% endfor %}
{% endfor %}
</p> Also refer to #283 |
Thank you mate @engram-design. |
Describe the bug
When I am use Bold and italic in link it is duplicate the link text. I have using renderHtml() for render content in frontend
Steps to reproduce
Craft CMS version
4.7.4
Plugin version
2.1.16
Multi-site?
No
Additional context
No response
The text was updated successfully, but these errors were encountered: