medium-editor-insert-plugin icon indicating copy to clipboard operation
medium-editor-insert-plugin copied to clipboard

Content dissapears on click

Open mQckingbird opened this issue 8 years ago • 5 comments

It's a weird behaviour. It must be in someplace inside this library, angular-medium or medium-editor itself.

See it running: http://codepen.io/Mr-K/pen/vGbaMy

As you can see, we have multiple instances of medium-editor working which each contains an initial value. The content is binded, and it seems ready to edit.

So far so good. BUT when you click at it, the content is replaced by nothing. It's missing. Gone, completely. You can see it in the codepen above.

mQckingbird avatar May 22 '16 18:05 mQckingbird

Any clues?

mQckingbird avatar May 23 '16 15:05 mQckingbird

The problem is in this library. Without including it, it works just fine.

mQckingbird avatar May 25 '16 04:05 mQckingbird

You have a lot of additional code in your codepen example. Can you verify that even if you strip everything and leave only MediumEditor + plugin, the bug is still there?

linkesch avatar Jun 14 '16 06:06 linkesch

@matikbird was the content you want to edit with editor with insert plugin preprocessed with medium editor?

In my case, I had one form which was filled by user with plain text. User clicked save and post with plain text was saved to db. Than user could edit it, but with medium editor this time. I prefilled medium editor with post plain text from db using editor.setContent(content, 0);. After clicking editor contenteditable, content disappeared! The solution is to surround content with p tags and only then paste them to editor with method mentioned.

Maybe that's your case?

ignacy130 avatar Sep 19 '16 19:09 ignacy130

Actually I'm waiting for the 3.0v that @orthes it's developing, full standalone. The current has a lot of libraries on it, like handlebars ─a template system─... and the whole thing contains like 10 buttons. But I fell in love with the 3.0v. I'd rather waiting with what @orthes is doing, which's amazing.

mQckingbird avatar Nov 20 '16 18:11 mQckingbird