Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embed breaks content #12

Closed
nickdima opened this issue Mar 18, 2017 · 11 comments · Fixed by #14
Closed

Embed breaks content #12

nickdima opened this issue Mar 18, 2017 · 11 comments · Fixed by #14

Comments

@nickdima
Copy link
Contributor

It seems that if you have an embed in the content it drops everything following it.
Looking at the DOM there isn't anything else following the iframe created for the embed.
Loading the same content in the editor it shows up correctly.

@jpuri
Copy link
Owner

jpuri commented Mar 30, 2017

Hey @nickdima: The generated output looks good here: https://jpuri.github.io/react-draft-wysiwyg/#/demo.

What is exactly issue you are facing ?

@jpuri
Copy link
Owner

jpuri commented Mar 30, 2017

Oh I see its issue cos of this parameter: allowFullScreen I will remove it soon.

Thanks for reporting.

@nickdima
Copy link
Contributor Author

The problem is not in the editor but when you convert the article to html with draftjs-to-html

@jpuri
Copy link
Owner

jpuri commented Mar 30, 2017

Yep I saw its issue in generated html.

@nickdima
Copy link
Contributor Author

nickdima commented Apr 8, 2017

Any idea on how to fix this?

@jpuri
Copy link
Owner

jpuri commented Apr 9, 2017

Hey @nickdima : Sorry for the delay, I am doing some fixes in editor today I will try to fix this also. You should have a new release of draftjs-to-html with fix by tomorrow.

jpuri added a commit that referenced this issue Apr 9, 2017
@jpuri
Copy link
Owner

jpuri commented Apr 9, 2017

Hi @nickdima : draftjs-to-html@0.7.1 should fix the issue.

@nickdima
Copy link
Contributor Author

nickdima commented Apr 9, 2017

Thanks @jpuri but unfortunately that fix doesn't solve the issue. The content still gets cut bellow the iframe.
I'l try to explain better what's happening.

So in my react-draft-wysiwyg editor I have this article that contains a paragraph, an iframe embed and then another paragraph. But when I load this article with draftjs-to-html it has only the first paragraph and the iframe. So any content following the iframe it doesn't get converted.
Check the attached screenshots:

Editor:

screen shot 2017-04-09 at 12 09 38


HTML (check the div container bellow and you'll see the last paragraph missing)

screen shot 2017-04-09 at 12 04 25

@jpuri
Copy link
Owner

jpuri commented Apr 9, 2017

Oh ok, looks like I did not correctly understood it before - I will look into it again now.

@nickdima
Copy link
Contributor Author

nickdima commented Apr 9, 2017

Thanks @jpuri !

@nickdima
Copy link
Contributor Author

I submitted a PR that fixes this: #14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants