Skip to content

Commit

Permalink
fix: add editable prop again
Browse files Browse the repository at this point in the history
  • Loading branch information
Palanikannan1437 committed Jan 10, 2025
1 parent 5ff8514 commit f78e367
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/editor/src/core/hooks/use-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ export const useEditor = (props: CustomEditorProps) => {

const editor = useTiptapEditor(
{
immediatelyRender: true,
editable,
immediatelyRender: false,
shouldRerenderOnTransaction: false,
autofocus,
editorProps: {
Expand Down
4 changes: 2 additions & 2 deletions packages/editor/src/core/hooks/use-read-only-editor.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HocuspocusProvider } from "@hocuspocus/provider";
import { EditorProps } from "@tiptap/pm/view";
import { useEditor as useCustomEditor, Extensions } from "@tiptap/react";
import { useEditor as useTiptapEditor, Extensions } from "@tiptap/react";
import { useImperativeHandle, MutableRefObject, useEffect } from "react";
import * as Y from "yjs";
// extensions
Expand Down Expand Up @@ -40,7 +40,7 @@ export const useReadOnlyEditor = (props: CustomReadOnlyEditorProps) => {
provider,
} = props;

const editor = useCustomEditor({
const editor = useTiptapEditor({
editable: false,
immediatelyRender: true,
shouldRerenderOnTransaction: false,
Expand Down

0 comments on commit f78e367

Please sign in to comment.