fix stiker forum

This commit is contained in:
2025-04-23 17:47:16 +08:00
parent 02f7e34107
commit a05368520e
8 changed files with 602 additions and 13 deletions

View File

@@ -1,19 +1,38 @@
import React from "react";
import { MainColor } from "../../color";
import { useShallowEffect } from "@mantine/hooks";
export function Component_SetInnerHtml({
export function Comp_DangerouslySetInnerHTML({
props,
color,
}: {
props: string
props: string;
color?: string;
}) {
// useShallowEffect(() => {
// // Add custom style for stickers inside Quill editor
// const style = document.createElement("style");
// style.textContent = `
// .chat-content img {
// max-width: 100px !important;
// max-height: 100px !important;
// }
// `;
// document.head.appendChild(style);
// return () => {
// // Clean up when component unmounts
// document.head.removeChild(style);
// };
// }, []);
return (
<>
<div
style={{
color: color ? color : MainColor.white,
}}
// className="chat-content"
dangerouslySetInnerHTML={{
__html: props,
}}