forked from github/plane
chore: added placeholder to remirror (#686)
* chore: added placeholder to remirror * fix: build error
This commit is contained in:
parent
3e08186d72
commit
35e40a7bec
@ -96,7 +96,7 @@ export const AddComment: React.FC = () => {
|
|||||||
setValue("comment_json", jsonValue);
|
setValue("comment_json", jsonValue);
|
||||||
setValue("comment_html", htmlValue);
|
setValue("comment_html", htmlValue);
|
||||||
}}
|
}}
|
||||||
// placeholder="Enter Your comment..."
|
placeholder="Enter your comment..."
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
@ -104,7 +104,7 @@ export const AddComment: React.FC = () => {
|
|||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
disabled={isSubmitting}
|
disabled={isSubmitting}
|
||||||
className="rounded-md bg-gray-300 p-2 px-4 text-sm text-black hover:bg-gray-300"
|
className="rounded-md bg-gray-300 p-2 px-4 text-sm text-black hover:bg-gray-300 mt-4"
|
||||||
>
|
>
|
||||||
{isSubmitting ? "Adding..." : "Comment"}
|
{isSubmitting ? "Adding..." : "Comment"}
|
||||||
</button>
|
</button>
|
||||||
|
@ -332,7 +332,7 @@ export const IssueForm: FC<IssueFormProps> = ({
|
|||||||
}
|
}
|
||||||
onJSONChange={(jsonValue) => setValue("description", jsonValue)}
|
onJSONChange={(jsonValue) => setValue("description", jsonValue)}
|
||||||
onHTMLChange={(htmlValue) => setValue("description_html", htmlValue)}
|
onHTMLChange={(htmlValue) => setValue("description_html", htmlValue)}
|
||||||
placeholder="Description"
|
placeholder="Describe the issue..."
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
@ -315,9 +315,9 @@ export const SinglePageBlock: React.FC<Props> = ({ block, projectDetails }) => {
|
|||||||
onJSONChange={(jsonValue) => setValue("description", jsonValue)}
|
onJSONChange={(jsonValue) => setValue("description", jsonValue)}
|
||||||
onHTMLChange={(htmlValue) => setValue("description_html", htmlValue)}
|
onHTMLChange={(htmlValue) => setValue("description_html", htmlValue)}
|
||||||
placeholder="Block description..."
|
placeholder="Block description..."
|
||||||
customClassName="border border-transparent"
|
customClassName="border border-transparent text-sm"
|
||||||
noBorder
|
noBorder
|
||||||
borderOnFocus
|
borderOnFocus={false}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
@ -185,25 +185,23 @@ const RemirrorRichTextEditor: FC<IRemirrorRichTextEditor> = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mt-2 mb-4">
|
<div className="relative">
|
||||||
<Remirror
|
<Remirror
|
||||||
manager={manager}
|
manager={manager}
|
||||||
initialContent={state}
|
initialContent={state}
|
||||||
classNames={[
|
classNames={[
|
||||||
`p-4 relative focus:outline-none rounded-md focus:border-gray-200 ${
|
`p-4 relative focus:outline-none rounded-md focus:border-gray-200 ${
|
||||||
noBorder ? "" : "border"
|
noBorder ? "" : "border"
|
||||||
} ${borderOnFocus ? "focus:border" : ""} ${customClassName}`,
|
} ${borderOnFocus ? "focus:border" : "focus:border-0"} ${customClassName}`,
|
||||||
]}
|
]}
|
||||||
editable={editable}
|
editable={editable}
|
||||||
onBlur={() => {
|
onBlur={() => {
|
||||||
onBlur(jsonValue, htmlValue);
|
onBlur(jsonValue, htmlValue);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{/* {(!value || value === "" || value?.content?.[0]?.content === undefined) && (
|
{(!value || value === "" || value?.content?.[0]?.content === undefined) && placeholder && (
|
||||||
<p className="pointer-events-none absolute top-[8.8rem] left-12 text-gray-300">
|
<p className="absolute pointer-events-none top-4 left-4 text-gray-300">{placeholder}</p>
|
||||||
{placeholder || "Enter text..."}
|
)}
|
||||||
</p>
|
|
||||||
)} */}
|
|
||||||
<EditorComponent />
|
<EditorComponent />
|
||||||
|
|
||||||
{imageLoader && (
|
{imageLoader && (
|
||||||
|
@ -65,11 +65,11 @@ const SinglePage: NextPage<UserAuth> = (props) => {
|
|||||||
workspaceSlug && projectId && pageId ? PAGE_DETAILS(pageId as string) : null,
|
workspaceSlug && projectId && pageId ? PAGE_DETAILS(pageId as string) : null,
|
||||||
workspaceSlug && projectId
|
workspaceSlug && projectId
|
||||||
? () =>
|
? () =>
|
||||||
pagesService.getPageDetails(
|
pagesService.getPageDetails(
|
||||||
workspaceSlug as string,
|
workspaceSlug as string,
|
||||||
projectId as string,
|
projectId as string,
|
||||||
pageId as string
|
pageId as string
|
||||||
)
|
)
|
||||||
: null
|
: null
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -77,11 +77,11 @@ const SinglePage: NextPage<UserAuth> = (props) => {
|
|||||||
workspaceSlug && projectId && pageId ? PAGE_BLOCKS_LIST(pageId as string) : null,
|
workspaceSlug && projectId && pageId ? PAGE_BLOCKS_LIST(pageId as string) : null,
|
||||||
workspaceSlug && projectId
|
workspaceSlug && projectId
|
||||||
? () =>
|
? () =>
|
||||||
pagesService.listPageBlocks(
|
pagesService.listPageBlocks(
|
||||||
workspaceSlug as string,
|
workspaceSlug as string,
|
||||||
projectId as string,
|
projectId as string,
|
||||||
pageId as string
|
pageId as string
|
||||||
)
|
)
|
||||||
: null
|
: null
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -272,8 +272,9 @@ const SinglePage: NextPage<UserAuth> = (props) => {
|
|||||||
key={label.id}
|
key={label.id}
|
||||||
className="group flex items-center gap-1 rounded-2xl border px-2 py-0.5 text-xs"
|
className="group flex items-center gap-1 rounded-2xl border px-2 py-0.5 text-xs"
|
||||||
style={{
|
style={{
|
||||||
backgroundColor: `${label?.color && label.color !== "" ? label.color : "#000000"
|
backgroundColor: `${
|
||||||
}20`,
|
label?.color && label.color !== "" ? label.color : "#000000"
|
||||||
|
}20`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
@ -341,8 +342,9 @@ const SinglePage: NextPage<UserAuth> = (props) => {
|
|||||||
<>
|
<>
|
||||||
<Popover.Button
|
<Popover.Button
|
||||||
type="button"
|
type="button"
|
||||||
className={`group inline-flex items-center outline-none ${open ? "text-gray-900" : "text-gray-500"
|
className={`group inline-flex items-center outline-none ${
|
||||||
}`}
|
open ? "text-gray-900" : "text-gray-500"
|
||||||
|
}`}
|
||||||
>
|
>
|
||||||
{watch("color") && watch("color") !== "" ? (
|
{watch("color") && watch("color") !== "" ? (
|
||||||
<span
|
<span
|
||||||
@ -418,7 +420,7 @@ const SinglePage: NextPage<UserAuth> = (props) => {
|
|||||||
)}
|
)}
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="flex items-center gap-1 rounded bg-gray-100 px-2.5 py-1 text-xs hover:bg-gray-200"
|
className="flex items-center gap-1 rounded bg-gray-100 px-2.5 py-1 text-xs hover:bg-gray-200 mt-4"
|
||||||
onClick={createPageBlock}
|
onClick={createPageBlock}
|
||||||
disabled={isAddingBlock}
|
disabled={isAddingBlock}
|
||||||
>
|
>
|
||||||
|
Loading…
Reference in New Issue
Block a user