Files
outline/shared/components/CustomEmoji.tsx
Tom MoorandCopilot f009236144 feat: Custom emojis in editor (#10758)
* Working pass, needs refactor

* revert

* fix: Copy/paste behavior

* fix: Public share rendering

* fixes

* fix: Click around emoji atom behavior

* fix: Cannot position caret next to heading

* Update app/scenes/Settings/components/EmojisTable.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-02 20:17:17 -05:00

18 lines
464 B
TypeScript

import useShare from "@shared/hooks/useShare";
type Props = React.ImgHTMLAttributes<HTMLImageElement> & {
value: string;
size?: number | string;
};
export const CustomEmoji = ({ value, size = 16, ...props }: Props) => {
const { shareId } = useShare();
return (
<img
src={`/api/emojis.redirect?id=${value}${shareId ? `&shareId=${shareId}` : ""}`}
style={{ width: size, height: size, objectFit: "contain" }}
{...props}
/>
);
};