Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/MarkdownContent/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,5 @@ export function Content(props: ContentProps) {
/**
* TODO: [πŸ‘Ό] Components <HtmlContent/>, <MarkdownContent/> and <Content> are coupled together more then they should be
* TODO: [πŸ‘©β€πŸ¦°] Allow to change fonts in <WallpaperContentSection/> or <Content/> or <HtmlContent/>
* TODO: [πŸ‘¨β€πŸ¦°] Show editable hint in <WallpaperContentSection/> or <Content/> or <HtmlContent/>
* TODO: [πŸ‘¨β€πŸ¦°] !!! Show editable hint in <WallpaperContentSection/> or <Content/> or <HtmlContent/>
*/
15 changes: 11 additions & 4 deletions src/components/MarkdownContent/HtmlContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -112,15 +113,21 @@ function HtmlContentEditable(props: Omit<HtmlContentProps, 'isEditable'>) {
}, [content, onHtmlChange, elementRef]);

return (
<div {...{ className }} ref={elementRef}>
This will be never shown because it is immediatelly replaced here [3] in useLayoutEffect
</div>
<Hint
id="wallpaper-content-edit"
/* <- TODO: This should be passed in props */ title="Edit the text"
reapearCount={0}
>
<div {...{ className }} ref={elementRef}>
This will be never shown because it is immediatelly replaced here [3] in useLayoutEffect
</div>
</Hint>
);
}

/**
* TODO: [πŸ‘Ό] Components <HtmlContent/>, <MarkdownContent/> and <Content> are coupled together more then they should be
* TODO: [🧠][πŸ’¬] Allow to change fonts and do rich text editing
* TODO: [πŸ‘©β€πŸ¦°] Allow to change fonts in <WallpaperContentSection/> or <Content/> or <HtmlContent/>
* TODO: [πŸ‘¨β€πŸ¦°] Show editable hint in <WallpaperContentSection/> or <Content/> or <HtmlContent/> (<- <HtmlContentEditable/>)
* TODO: [πŸ‘¨β€πŸ¦°] !!! Show editable hint in <WallpaperContentSection/> or <Content/> or <HtmlContent/> (<- <HtmlContentEditable/>)
*/
2 changes: 1 addition & 1 deletion src/components/WallpaperContent/WallpaperContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export function WallpaperContentSection() {

/**
* TODO: [πŸ‘©β€πŸ¦°] Allow to change fonts in <WallpaperContentSection/> or <Content/> or <HtmlContent/>
* TODO: [πŸ‘¨β€πŸ¦°] Show editable hint in <WallpaperContentSection/> or <Content/> or <HtmlContent/>
* TODO: [πŸ‘¨β€πŸ¦°] !!! Show editable hint in <WallpaperContentSection/> or <Content/> or <HtmlContent/>
* 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
Expand Down