Back to Neko

Set Clipboard Content

webpage/docs/api/clipboard-set-text.api.mdx

3.1.42.0 KB
Original Source

import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; import ParamsDetails from "@theme/ParamsDetails"; import RequestSchema from "@theme/RequestSchema"; import StatusCodes from "@theme/StatusCodes"; import OperationTabs from "@theme/OperationTabs"; import TabItem from "@theme/TabItem"; import Heading from "@theme/Heading";

<Heading as={"h1"} className={"openapi__heading"} children={"Set Clipboard Content"}

</Heading>

<MethodEndpoint method={"post"} path={"/api/room/clipboard"} context={"endpoint"}

</MethodEndpoint>

Update the content of the clipboard (rich-text or plain-text).

<Heading id={"request"} as={"h2"} className={"openapi-tabs__heading"} children={"Request"}

</Heading>

<ParamsDetails parameters={undefined}

</ParamsDetails>

<RequestSchema title={"Body"} body={{"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","example":"Copied Content 123","description":"The plain text content of the clipboard."},"html":{"type":"string","example":"<b>Copied Content 123</b>","description":"The HTML content of the clipboard."}},"title":"ClipboardText"}}},"required":true}}

</RequestSchema>

<StatusCodes id={undefined} label={undefined} responses={{"204":{"description":"Clipboard content updated successfully."},"401":{"description":"The request requires user authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Detailed error message."}},"title":"ErrorMessage"}}}},"403":{"description":"The server understood the request, but refuses to authorize it.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Detailed error message."}},"title":"ErrorMessage"}}}},"500":{"description":"Unable to set clipboard content.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Detailed error message."}},"title":"ErrorMessage"}}}}}}

</StatusCodes>