From b18c77059b4db53277d84d2ec216c54467ba52b4 Mon Sep 17 00:00:00 2001 From: Pavol Hejny Date: Tue, 29 Aug 2023 19:12:25 +0200 Subject: [PATCH 1/2] Draft of editing hint --- src/components/MarkdownContent/HtmlContent.tsx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/components/MarkdownContent/HtmlContent.tsx b/src/components/MarkdownContent/HtmlContent.tsx index 84b04d195..e759857c8 100644 --- a/src/components/MarkdownContent/HtmlContent.tsx +++ b/src/components/MarkdownContent/HtmlContent.tsx @@ -2,6 +2,7 @@ import parse from 'html-react-parser'; import { useEffect, useLayoutEffect, useRef } from 'react'; import { useSsrDetection } from '../../utils/hooks/useSsrDetection'; import { string_css_class, string_href, string_html } from '../../utils/typeAliases'; +import { Hint } from '../Hint/Hint'; import { extractFontsFromContent } from '../ImportFonts/extractFontsFromContent'; import { mapLinksInHtml } from './mapLinksInHtml'; @@ -112,9 +113,15 @@ function HtmlContentEditable(props: Omit) { }, [content, onHtmlChange, elementRef]); return ( -
- This will be never shown because it is immediatelly replaced here [3] in useLayoutEffect -
+ +
+ This will be never shown because it is immediatelly replaced here [3] in useLayoutEffect +
+
); } From fc41862942a52fbcb37ee2b608389655b9458876 Mon Sep 17 00:00:00 2001 From: Pavol Hejny Date: Tue, 29 Aug 2023 19:13:46 +0200 Subject: [PATCH 2/2] Revert "Move important TODOs to feature branch" This reverts commit af0e6f45cbd7061fdd117662659c68c22d4563b8. --- src/components/MarkdownContent/Content.tsx | 2 +- src/components/MarkdownContent/HtmlContent.tsx | 2 +- src/components/WallpaperContent/WallpaperContent.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/MarkdownContent/Content.tsx b/src/components/MarkdownContent/Content.tsx index 4fc8d83f2..d8cabaebd 100644 --- a/src/components/MarkdownContent/Content.tsx +++ b/src/components/MarkdownContent/Content.tsx @@ -91,5 +91,5 @@ export function Content(props: ContentProps) { /** * TODO: [👼] Components , and are coupled together more then they should be * TODO: [👩‍🦰] Allow to change fonts in or or - * TODO: [👨‍🦰] Show editable hint in or or + * TODO: [👨‍🦰] !!! Show editable hint in or or */ diff --git a/src/components/MarkdownContent/HtmlContent.tsx b/src/components/MarkdownContent/HtmlContent.tsx index fdff4e8a9..e759857c8 100644 --- a/src/components/MarkdownContent/HtmlContent.tsx +++ b/src/components/MarkdownContent/HtmlContent.tsx @@ -129,5 +129,5 @@ function HtmlContentEditable(props: Omit) { * TODO: [👼] Components , and are coupled together more then they should be * TODO: [🧠][💬] Allow to change fonts and do rich text editing * TODO: [👩‍🦰] Allow to change fonts in or or - * TODO: [👨‍🦰] Show editable hint in or or (<- ) + * TODO: [👨‍🦰] !!! Show editable hint in or or (<- ) */ diff --git a/src/components/WallpaperContent/WallpaperContent.tsx b/src/components/WallpaperContent/WallpaperContent.tsx index e4a18ef7b..de03dbc63 100644 --- a/src/components/WallpaperContent/WallpaperContent.tsx +++ b/src/components/WallpaperContent/WallpaperContent.tsx @@ -131,7 +131,7 @@ export function WallpaperContentSection() { /** * TODO: [👩‍🦰] Allow to change fonts in or or - * TODO: [👨‍🦰] Show editable hint in or or + * TODO: [👨‍🦰] !!! Show editable hint in or or * TODO: Maybe split header and content font * TODO: isHashUsed + test it and put into menu + some way to return existing hashes * TODO: [🎐] Some markdown can not be converted back from html - use fallback to pure html content