This is not supported. The RTE only writes the "rel" attribute in the IMG elements. There is no markup telling what (real) Media node id is referenced in RTE link to file.
Example img: <img src="/media/1050/forest-05.jpg?width=500&height=375" alt="forest-05.jpg" rel="2150" />
Example link to file: <a href="/media/1047/2805-1103.pdf" title="2805-1103.pdf">LINK_TO_FILE</a>
I guess one could try and look for href="/media/..." and then do a GetMediaByPath() to find out the real Media node id.
Link to file in RTE in Umbraco 7
It would appear that "link to file" in the RTE doesnt get added (PDFs at least).
Am I missing anything or is this not supported?
Martin
Hi Martin,
This is not supported. The RTE only writes the "rel" attribute in the IMG elements. There is no markup telling what (real) Media node id is referenced in RTE link to file.
Example img:
<img src="/media/1050/forest-05.jpg?width=500&height=375" alt="forest-05.jpg" rel="2150" />
Example link to file:
<a href="/media/1047/2805-1103.pdf" title="2805-1103.pdf">LINK_TO_FILE</a>
I guess one could try and look for href="/media/..." and then do a GetMediaByPath() to find out the real Media node id.
Please consider writing an enhancement issue at https://github.com/rolfis/MediaContentUsage/issues if you find this important.
Rolf
is working on a reply...