It's easy to play editor content in a way that placeholder disappears.

Isn't it just a case of removed element? If the placeholder was on an element and the element got removed, no wonder there is no placeholder.
I'm expecting when the editor is empty I see the placeholder.
I believe this is not the case for this example. This example sets a placeholder on <h2> and <p> elements. If those are removed, and then "normal" P is created, then you won't see any placeholder. I guess that placeholder would have to bet on main editable element or some additional scripts would have to take care of creating placeholder elements if editor's content is empty.
:point_up:
We may think about adding functionality to placeholder allowing it to be placed on the document root. It seems like it might be a common scenario.
It'd be lovely to allow configuring placeholders for every editor. I'd love to have it as a config option.
@szymonkups Wouldn't it work already? We can add attributes on root model elements, however I am not sure about conversion or exact placeholder implementation.
@szymonkups Wouldn't it work already? We can add attributes on root model elements, however I am not sure about conversion or exact placeholder implementation.
I will test it.
I found this ticket really confusing. At the beginning it's about a bug to later become a feature ticket :D.
So, let's have a proper feature request: https://github.com/ckeditor/ckeditor5/issues/479. We'll start from there and see where it leads us.
Most helpful comment
:point_up:
We may think about adding functionality to placeholder allowing it to be placed on the document root. It seems like it might be a common scenario.