uiwjs / react-textarea-code-editor

A simple code editor with syntax highlighting.
https://uiwjs.github.io/react-textarea-code-editor/
MIT License
476 stars 22 forks source link

Placeholder behavior not as expected #131

Closed leonardomathon closed 1 year ago

leonardomathon commented 1 year ago

I just upgraded to version 2.0.3 and the behavior of the placeholder seems to have changed in version 2.0.2 (I believe due to #114).

Behavior prior to 2.0.2 When the placeholder attribute was set, the <code> element was empty until a value is set. The placeholder text is a different, darker color than the actual text color, as it should be. image

Behavior after 2.0.2 When the placeholder is set and no value is specified, the placeholder is also listed in the <code> tag, so it overlays the actual placeholder. This means that the color is not as dark as it used to be and for some reason, the edges of the font seem rougher (not noticeable in screenshot). image

Is there a way I can not add the value of the placeholder to the <code> tag, so that the behavior stays the same like versions before 2.0.3?

jaywcjlove commented 1 year ago

@leonardomathon oh, i fixed it.

leonardomathon commented 1 year ago

@jaywcjlove awesome, though, the release CI failed

jaywcjlove commented 1 year ago

@leonardomathon CI passed.

leonardomathon commented 1 year ago

Thanks, it's fixed.