Currently, both macros and images have specific graphQL fields in addition to the markup value to support client post-processing of the rich text.
We need to offer similar support for links as well, since clients will often need to replace these.
Examples of output from processedHtml output:
This is what a regular content link might look like:
<a href=\"/site/hmdb/draft/hmdb/persons/john-travolta\" title=\"Johnny boy\" data-link-ref="123123">internal links</a>
This is what a "download link" might look like
<a href=\"/site/hmdb/draft/hmdb/api/_/attachment/download/09b3af0e-6da3-4bcf-88d9-11cbe9c41283:6be9f41d72ad1d0039aa3e691e5e2a939eede37e/Lea-Seydoux.jpg\" data-link-ref="12312qw3eq3">download links</a>
Proposed query:
text {
value(processHtml:{}) {
processedHtml
links{
uri
ref
media { # only for media, if content then `null`
intent # `download` or `inline`
content
}
content # only for content, if media then `null`
}
images{}
macros{}
}
}
}
Currently, both macros and images have specific graphQL fields in addition to the markup value to support client post-processing of the rich text.
We need to offer similar support for links as well, since clients will often need to replace these.
Examples of output from processedHtml output:
This is what a regular content link might look like:
<a href=\"/site/hmdb/draft/hmdb/persons/john-travolta\" title=\"Johnny boy\" data-link-ref="123123">internal links</a>
This is what a "download link" might look like
<a href=\"/site/hmdb/draft/hmdb/api/_/attachment/download/09b3af0e-6da3-4bcf-88d9-11cbe9c41283:6be9f41d72ad1d0039aa3e691e5e2a939eede37e/Lea-Seydoux.jpg\" data-link-ref="12312qw3eq3">download links</a>
Proposed query: