GetmeUK / ContentTools

A JS library for building WYSIWYG editors for HTML content.
http://getcontenttools.com
MIT License
3.94k stars 393 forks source link

Inspector bar doesn't show embedded HTML elements when wrapped with paragraph #581

Closed john3parker closed 1 year ago

john3parker commented 1 year ago

ContentTools isn't showing element tags embedded within a paragraph "p" element. In the attached image, there's an anchor "a" tag with bold text "b" with in a paragraph. The inspector doesn't show the "a"or "b" tags. See the attached image for example. It does work properly with table, tbody, tr, td tags.

I'm interested to apply a class style to the tag to make it appear as a call-to-action button. Any assistance to help resolve this would be much appreciated!

Screenshot from 2023-03-01 09-22-29

john3parker commented 1 year ago

After reviewing the source code, I understand why the inspector doesn't show the embedded tags within a "p" tag. I opted to build my own custom tools to set the class styles. Works perfectly. Thank you for a great API and documentation!