Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Placeholder editor bug #6016

Closed
1 task done
suntochukwu opened this issue Jan 11, 2025 · 2 comments
Closed
1 task done

[Bug]: Placeholder editor bug #6016

suntochukwu opened this issue Jan 11, 2025 · 2 comments
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug

Comments

@suntochukwu
Copy link

Affected Packages

extension-placeholder

Version(s)

2.11.2

Bug Description

Following the documentation on a placeholder...doesn't work.


const editor = useEditor({
    extensions: [StarterKit , boldtoggle, italictoggle, 
      Placeholder.configure({placeholder: 'Write your post here...'}),
      CharacterCount.configure({limit: charc}),
      TextAlign.configure({ types : ['heading', 'paragraph', 'History'], 
      alignments: ['left', 'right', 'center']})], 
      editorProps : { attributes : {class: 'focus:outline-none' } }
  })

Doesn't show. Pretty simple

Browser Used

Chrome

Code Example URL

https://codesandbox.io/p/sandbox/distracted-http-fq6ylw?file=%2Fsrc%2FApp.js%3A18%2C6

Expected Behavior

Show the placeholder text

Additional Context (Optional)

No response

Dependency Updates

  • Yes, I've updated all my dependencies.
@suntochukwu suntochukwu added Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug labels Jan 11, 2025
@kart-c
Copy link
Contributor

kart-c commented Jan 13, 2025

I think you may have missed adding the required CSS for the placeholder extension to work.
Docs link - https://tiptap.dev/docs/editor/extensions/functionality/placeholder#additional-setup

@nperez0111
Copy link
Contributor

Correct, you are missing the CSS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug
Projects
None yet
Development

No branches or pull requests

3 participants