Skip to content

Commit

Permalink
style: page title and checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
aaryan610 committed Dec 17, 2024
1 parent 7959a19 commit a7ddf3d
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 186 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export * from "./collaborative-editor";
export * from "./collaborative-read-only-editor";
export * from "./loader";
export * from "./page-renderer";
export * from "./read-only-editor";
3 changes: 3 additions & 0 deletions packages/editor/src/core/extensions/extensions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ export const CoreEditorExtensions = (args: TArguments): Extensions => {
CustomCodeInlineExtension,
Markdown.configure({
html: true,
transformCopiedText: true,
transformPastedText: true,
breaks: true,
}),
Expand All @@ -152,6 +153,8 @@ export const CoreEditorExtensions = (args: TArguments): Extensions => {
}),
Placeholder.configure({
placeholder: ({ editor, node }) => {
if (!editor.isEditable) return;

if (node.type.name === "heading") return `Heading ${node.attrs.level}`;

if (editor.storage.imageComponent.uploadInProgress) return "";
Expand Down
2 changes: 0 additions & 2 deletions packages/editor/src/core/extensions/read-only-extensions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import {
TableRow,
Table,
CustomMention,
HeadingListExtension,
CustomReadOnlyImageExtension,
CustomTextAlignExtension,
CustomCalloutReadOnlyExtension,
Expand Down Expand Up @@ -139,7 +138,6 @@ export const CoreReadOnlyEditorExtensions = (props: Props): Extensions => {
}),
CharacterCount,
CustomColorExtension,
HeadingListExtension,
CustomTextAlignExtension,
CustomCalloutReadOnlyExtension,
...CoreReadOnlyEditorAdditionalExtensions({
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion packages/editor/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import "./styles/drag-drop.css";
// editors
export {
CollaborativeDocumentEditorWithRef,
CollaborativeDocumentReadOnlyEditorWithRef,
DocumentReadOnlyEditorWithRef,
LiteTextEditorWithRef,
LiteTextReadOnlyEditorWithRef,
Expand Down
12 changes: 6 additions & 6 deletions packages/editor/src/styles/editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,12 @@ ul[data-type="taskList"] li > label input[type="checkbox"] {
transform: scale(1.05);
}

ul[data-type="taskList"] li > label input[type="checkbox"]:hover {
background-color: rgba(var(--color-background-80)) !important;
.ProseMirror[contenteditable="true"] input[type="checkbox"]:hover {
background-color: rgba(var(--color-background-80));
}

.ProseMirror[contenteditable="false"] input[type="checkbox"] {
pointer-events: none;
}

ul[data-type="taskList"] li > label input[type="checkbox"][checked] {
Expand Down Expand Up @@ -151,10 +155,6 @@ ul[data-type="taskList"] li > label input[type="checkbox"] {
margin-right: 0.2rem;
margin-top: 0.15rem;

&:hover {
background-color: rgb(var(--color-background-80));
}

&:active {
background-color: rgb(var(--color-background-90));
}
Expand Down
6 changes: 3 additions & 3 deletions web/core/components/pages/editor/editor-body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,13 @@ export const PageEditorBody: React.FC<Props> = observer((props) => {
{!isFullWidth && <PageContentBrowser editorRef={editorRef.current} />}
</Row>
<div
className={cn("h-full w-full pt-5 duration-200", {
className={cn("size-full pt-5 duration-200", {
"md:w-[calc(100%-10rem)] xl:w-[calc(100%-28rem)]": !isFullWidth,
"md:w-[90%]": isFullWidth,
})}
>
<div className="h-full w-full flex flex-col gap-y-7 overflow-y-auto overflow-x-hidden">
<div className="relative w-full flex-shrink-0 md:pl-5 px-4">
<div className="size-full flex flex-col gap-y-7 overflow-y-auto overflow-x-hidden">
<div className="relative w-full flex-shrink-0 md:pl-5 px-4 h-[38px]">
<PageEditorTitle
editorRef={editorRef}
title={pageTitle}
Expand Down

0 comments on commit a7ddf3d

Please sign in to comment.