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

Email All Members Formatting Issues and Errors #502

Open
mooped opened this issue Mar 9, 2021 · 3 comments
Open

Email All Members Formatting Issues and Errors #502

mooped opened this issue Mar 9, 2021 · 3 comments
Labels
front end Frontend, Blade, CSS, JS or text copy

Comments

@mooped
Copy link

mooped commented Mar 9, 2021

When composing an email using Email All Members and pasting from a Google Doc I initially received an error 500 on reviewing the form.

After some adjustments the error stopped happening (don't know why), but there were several formatting issues reflected in the output not visible in the preview.

I can provide the document I pasted from if that's useful, but the results have been inconsistently reproducible.

Additionally in one case I selected some text that had been implicitly made and hit the link button to change the link text, upon submitting the link dialog the link moved from where it was in the docuemtn to below the bottom of the text area where it could not be selected. Upon reloading the page (restoring the message) the URL of the link was appended to the end of the message and selectable again.

@dpslwk
Copy link
Member

dpslwk commented Mar 9, 2021

from the error logs production.ERROR: DOMDocument::loadHTML(): Unexpected end tag : p in Entity, line: 1 {"userId":123,"exception":"[object]

its all a massive fudge to be able to have the WYSIWYG editor interpret a pasted google doc
since google docs use a horrible mash of markup under the hood

i should try and catch the error and pass its back as a validation error
but fixing it would still be down to the user, the <\> button is there to mess with the html source

@mooped
Copy link
Author

mooped commented Mar 9, 2021

It makes sense that Google Docs generated markup is difficult to rework into something the WYSIWYG editor handles well.

Would it be possible to add a button to strip formatting from a selection, as a fallback to revert to a hopefully working state? It would save a step copying through a text editor to rip out Google's formatting (though obviously things like bullet points and other formatting would be lost).

Some visibility of the specific error would definitely be helpful to save making random edits until it works, or pasting through a text editor as mentioned above.

@dpslwk
Copy link
Member

dpslwk commented Mar 9, 2021

the editor is https://summernote.org

have some code that was from an article i found way back, that tries its best to clean things up

had wanted to look at swapping it out for https://trix-editor.org for a while, though i have no idea if that's better at pasting in google docs

no idea about adding a button into the editor to add functions

@dpslwk dpslwk added the front end Frontend, Blade, CSS, JS or text copy label Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
front end Frontend, Blade, CSS, JS or text copy
Projects
None yet
Development

No branches or pull requests

2 participants