Vue3: CustomHeadings: Wrapper element to pass the attributes to the headings #4962
Unanswered
demiro
asked this question in
Questions & Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
what I am trying to do now is a simple extension on the headings - making them draggable
and in turn, this is CustomHeadingsComponent:
It works, but it messes with my Plcaheolder extension, because instead of putting the data-placeholder="Enter heading ..." attribute to the actual heading element, it sets it to the wrapper... the same goes for "is-empty" class.
So this is frustrating enough... so what I wanted to do is I tried to get the parent classes from the wrapper and pass it to the NodeViewContent ... but I couldn't find the way to do it.
So I tried to fix it with CSS ... so instead of putting .is-empty:before ... I was then targetting .is-empty>h1, .is-empty>h2, .... {&:before ....} .... but there is another issue, with
data-placeholder is supposed to be on the heading el, to read it's value....
all of this seems very hacky to me...
does somebody have an idea of how to sort this?
Beta Was this translation helpful? Give feedback.
All reactions