diff --git a/packages/editor/core/src/ui/extensions/index.tsx b/packages/editor/core/src/ui/extensions/index.tsx index 1406cde67..4ae55f00c 100644 --- a/packages/editor/core/src/ui/extensions/index.tsx +++ b/packages/editor/core/src/ui/extensions/index.tsx @@ -52,12 +52,12 @@ export const CoreEditorExtensions = ( class: "leading-normal -mb-2", }, }, - // blockquote: { - // HTMLAttributes: { - // class: "border-l-4 border-custom-border-300", - // }, - // }, - code: false, + code: { + HTMLAttributes: { + class: "rounded-md bg-custom-primary-30 mx-1 px-1 py-1 font-mono font-medium text-custom-text-1000", + spellcheck: "false", + }, + }, codeBlock: false, horizontalRule: false, dropcursor: { diff --git a/web/pages/[workspaceSlug]/projects/[projectId]/pages/[pageId].tsx b/web/pages/[workspaceSlug]/projects/[projectId]/pages/[pageId].tsx index 067d3e18f..f91be2c2d 100644 --- a/web/pages/[workspaceSlug]/projects/[projectId]/pages/[pageId].tsx +++ b/web/pages/[workspaceSlug]/projects/[projectId]/pages/[pageId].tsx @@ -177,7 +177,7 @@ const PageDetailsPage: NextPageWithLayout = observer(() => { onErrorAction: () => void ) => { const commonSwrOptions: MutatorOptions = { - revalidate: true, + revalidate: false, populateCache: false, rollbackOnError: () => { onErrorAction(); @@ -201,6 +201,22 @@ const PageDetailsPage: NextPageWithLayout = observer(() => { }); }; + useEffect(() => { + mutatePageDetails(undefined, { + revalidate: true, + populateCache: true, + rollbackOnError: () => { + actionCompleteAlert({ + title: `Page could not be updated`, + message: `Sorry, page could not be updated, please try again later`, + type: "error", + }); + return true; + }, + }); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + const updatePage = async (formData: IPage) => { if (!workspaceSlug || !projectId || !pageId) return;