-
Notifications
You must be signed in to change notification settings - Fork 549
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
[WIP] HTML converter #59
base: master
Are you sure you want to change the base?
Conversation
supported HTML tags for now are: |
Hey @ttlg , thanks for the PR. Just wanted to let you know that I saw it but might not be able to review it right away with all the holidays coming up. I'll try and get to this as soon as possible. P.S.: After a quick glance, I feel like this is a valuable addition. We need to work out some details (including the Container attribute) but overall it would be nice to get this merged eventually. |
Thanks! I look forward your review. |
Looked at this, and embed support is great, however because most people (I guess?) will be extending ZefyrImageDelegate in order for images to be uploaded, it might be nice to support a way to override the image embed tag. In my case, for example, when an image is inserted I upload & generate an ID for it (server side), so embed.value["source"] is the ID of the image, and delegate's buildImage uses a NetworkImage object with the right url. Making a html export needs to have the correct url of course (the delegate holds a map of id → url info) but also the ID needs to be kept as a data- attribute of the img tag. I guess it'd make sense to be able to override _writeEmbedTag(), maybe making it override-able. |
@ttlg Thanks for your code, after some testing I noticed your code does not handle linebreaks (no andhtmlKeys.br isn't used by _NotusHTMLEncoder ).
Made a quick & very dirty fix for myself by editing |
Hi guys, How far are we from closing this PR? |
@ttlg Would you still be interested in addressing comments if I review this pull request? I think it'd definitely be easier to get this merged if we can remove Container attribute from here and discuss it separately. |
@pulyaevskiy sorry for the late reply. I think I do not have enough time to handle the changes. |
There is problem with this. if a line is bulleted (unordered list) and that line contains different styles per word like
it gives output like
have a llok at this.. |
I implemented Delta <-> HTML encoder/decoder and its tests.
For allowing arbitrary HTML attributes, I added Notus container attribute which containing HTML attributes data. If you do not like the idea, I will remove this part from the pull request.
Please give me any feedback.
Thank you.