Hi @tsi ,
i am on 6.0.5.
For a content-component that is correct, but not so for a part-component.
In my app I have the following config for a part:
<input name="teaser" type="HtmlArea">
<label>Text</label>
<default>
<p>Enter description here</p>
</default>
</input>
This is the result, when I add a link in part-configuration
Part:
{
"descriptor": "de.lyn.be:banner",
"config": {
"header": "neues Buch ",
"teaser": "<p>see here: <a href=\"content://d955b5ee-c605-4cdd-b3e6-663e2bc4fbc9\">Reliquie</a></p>\n",
"image": "28911ad4-e29f-4533-8c1b-a27b59dd8678"
}
}
And there also seems to be an issue with absolute path in frontend for images and links:
I also have a htmlArea
in a content-type. When I add an image, the src is not absolute! So this works in content-studio with proxy. But not on the frontend!
<img alt="Katharina_m.jpg" src="/site/default/master/lyn/graphql/_/image/c74c551a-88c7-4ef7-96bc-f6c2ebfae41a:a882aada761bbb23f2abf2c6084ac6237faf8172/width-768/Katharina_m.jpg" data-image-ref="6843ff84-e187-4e7c-a20f-6c791abc4fb6" style="width:100%">
The path for a link from the htmlArea on the other hand looks the following:
http://localhost:3000/site/default/master/lyn/secretum
and should be:
http://localhost:3000/secretum
This is how my query looks:
import {APP_NAME_UNDERSCORED} from "../../_enonicAdapter/utils";
const getBook = `
query ($path: ID!) {
guillotine {
get(key: $path) {
displayName
... on ${APP_NAME_UNDERSCORED}_Book {
data {
subtitle
content {
processedHtml
images {
image {
_id
}
}
links {
ref
}
}
cover {
... on media_Image {
imageUrl: imageUrl(type: absolute, scale: "width(250)")
attachments {
name
}
}
}
}
}
parent {
_path(type: siteRelative)
}
}
}
}
`
export default getBook;
and this is my view:
import React from 'react';
import {FetchContentResult} from "../../_enonicAdapter/guillotine/fetchContent";
import {Container, Heading, Image} from "@chakra-ui/react";
import RichTextView from "../../_enonicAdapter/views/RichTextView";
import PropsView from "./Props";
const Book = (props: FetchContentResult) => {
const {displayName, data, parent} = props.data?.get;
return (
<Container>
<Heading>
{displayName}
</Heading>
<Image src={data.cover.imageUrl}></Image>
<RichTextView data={data.content} meta={props.meta}/>
<pre>
{JSON.stringify(props.meta, null, 2)}
</pre>
<PropsView {...props} />
</Container>
);
};
export default Book;
Thomas