From 5136b6b098bee9d17053b0a9d8ea7ca39f20a5f2 Mon Sep 17 00:00:00 2001 From: Lars Rasmussen Date: Tue, 19 Dec 2023 17:28:06 +0100 Subject: [PATCH] fix: Make links point to the correct href in static renderer view and change link strings --- src/frontend/plugins/create-renderers.tsx | 4 +++- src/frontend/serlo-editor.tsx | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/frontend/plugins/create-renderers.tsx b/src/frontend/plugins/create-renderers.tsx index 7a5588be..c9ed1537 100644 --- a/src/frontend/plugins/create-renderers.tsx +++ b/src/frontend/plugins/create-renderers.tsx @@ -163,7 +163,9 @@ export function createRenderers(): InitRenderersArgs { linkRenderer: ({ href, children }: ComponentProps) => { return ( <> - {children} + + {children} + ) }, diff --git a/src/frontend/serlo-editor.tsx b/src/frontend/serlo-editor.tsx index 915873f7..79465c1f 100644 --- a/src/frontend/serlo-editor.tsx +++ b/src/frontend/serlo-editor.tsx @@ -43,6 +43,12 @@ export function SerloEditor({ const serloLoggedInData = getLoggedInData(Instance.De) as LoggedInData + // HACK: Change strings in link element. Searching or inserting an id is not possible in this integration. + serloLoggedInData.strings.editor.plugins.text.linkOverlay.placeholder = + 'https://example.com/' + serloLoggedInData.strings.editor.plugins.text.linkOverlay.inputLabel = + "Gib eine URL inklusive 'https://' ein" + return ( <>