question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using Codemirror Addons

See original GitHub issue

I’d like to take advantage of the Placeholder addon. This requires adding a placeholder attribute to the textarea. Can this react-codemirror component be extended to include the ability to add attributes directly to the textarea element that gets generated?

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:10

github_iconTop GitHub Comments

10reactions
cafreemancommented, May 13, 2016

@davedawson @JedWatson FWIW, I’ve created a fork of this component and implemented the placeholder functionality. I can open a PR if you’re open to that.

https://github.com/cafreeman/react-codemirror/commit/a3d1f6c83798119bee408d9d91a5965b435fe19d

2reactions
c-emilcommented, Apr 23, 2018

It doesn’t work just by setting placeholder under the options object for me @RahavLussato. I also had to require the plugin using require('codemirror/addon/display/placeholder')

Read more comments on GitHub >

github_iconTop Results From Across the Web

CodeMirror 5 User Manual
CodeMirror is a code-editor component that can be embedded in Web pages. The core library provides only the editor component, no accompanying buttons,...
Read more >
Codemirror, how to add add-ons - Stack Overflow
First, you have to add the scrollpastend.js file ...
Read more >
codemirror-addon · GitHub Topics
Add this topic to your repo. To associate your repository with the codemirror-addon topic, visit your repo's landing page and select "manage topics."...
Read more >
codemirror-show-hint-addon-options - npm
CodeMirror is a versatile text editor implemented in JavaScript for the browser. It is specialized for editing code, and comes with over 100 ......
Read more >
How to use the codemirror.defineOption function in ... - Snyk
To help you get started, we've selected a few codemirror examples, based on popular ways it is used in public projects. ... Secure...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found