You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I figured out it is not possible to easily manipulate the URL in a Link Element.
All AbstractInline have a $data property which allows us to manipulate all the possible attributes we can imagine (I guess also any data-xxxxx attribute which is great) but URL is not stored in this property. Even when storing it in the $data array with a custom Document Processor, it will not be used. We need to define a custom Renderer, which will override the default LinkRenderer (which I don't want).
A solution could be to have the possibility to use multiple renderers for a given element as suggested in #35 (which seems to be solved with #222). Another solution could be to simply store the url in $data rather than in $url property so that it can simply be manipulated with a simple custom processor (seems best solution to me).
Maybe I missed something, then please let me know.
The text was updated successfully, but these errors were encountered:
I've realized that Link and Image are both WebResources. First one's url is src whereas second's is href. I understand that it makes it easier to manipulate a single $url property, however I think it should be manipulated by storing it in $data. Or let AbstractWebResource have a public setUrl() method ?
Hi,
I figured out it is not possible to easily manipulate the URL in a
Link
Element.All
AbstractInline
have a$data
property which allows us to manipulate all the possible attributes we can imagine (I guess also anydata-xxxxx
attribute which is great) but URL is not stored in this property. Even when storing it in the$data
array with a custom Document Processor, it will not be used. We need to define a custom Renderer, which will override the default LinkRenderer (which I don't want).A solution could be to have the possibility to use multiple renderers for a given element as suggested in #35 (which seems to be solved with #222). Another solution could be to simply store the url in
$data
rather than in$url
property so that it can simply be manipulated with a simple custom processor (seems best solution to me).Maybe I missed something, then please let me know.
The text was updated successfully, but these errors were encountered: