react-medium-editor icon indicating copy to clipboard operation
react-medium-editor copied to clipboard

Updating the value does not cause the placeholder to disappear

Open bassettsj opened this issue 9 years ago • 5 comments

When the parent element sets the text value, I would expect the value to cause the placeholder to be removed:

image of react-medium-editor with placholder and value

bassettsj avatar Apr 27 '16 20:04 bassettsj

placeholder: { text: 'Some text', hideOnClick: true } Docs: https://github.com/yabwe/medium-editor#placeholder-options

shark0der avatar May 13 '16 17:05 shark0der

Same issue here, we pre-load the editor with data in some cases:

image

(in my case there is no click or focus event)

jcalfee avatar Jun 27 '16 19:06 jcalfee

My workaround until this is fixed:

Container div:

<div className={classNames({ 'hide-placeholder': hasText(text.value) })}>

CSS:

.hide-placeholder .medium-editor-placeholder:after {
    display: none;
}

MartijnHols avatar Jul 05 '16 16:07 MartijnHols

@jcalfee, @bassettsj , it works fine, just put placeholder: false to options

kopaygorodsky avatar Jan 26 '17 13:01 kopaygorodsky

issue can be closed, I think

kopaygorodsky avatar Jan 26 '17 13:01 kopaygorodsky