dwyl / bestevidence

:briefcase: City, University of London BestEvidence app
http://bestevidence.info/
11 stars 0 forks source link

Messaging deletes all formatting #477

Open ajburls opened 6 years ago

ajburls commented 6 years ago

Messages lose all formatting on being sent making them unattractive and hard to read.

iteles commented 6 years ago

@ajburls A screenshot would be great if you have one! We didn't have things like bold and italics as requirements but it losing line breaks or spacing?

ajburls commented 6 years ago

@iteles Loses everything.

image

(Cant understand why this wouldn't just have been set up like the "about us" box etc - it doesn't make sense to assume that anyone would want messages to be continuous plain text so basic formatting and ability to have hypertext links is not something that should need to specified as a "requirement", as it wasn't for these other items.)

RobStallion commented 6 years ago

@ajburls The 'about us' input box currently uses a third party to format the text. This comes with a pop-up notification unless your have the premium version.

image

I can add this solution to the messages but this would mean that client admins would also see this message.

@ajburls has confirmed that this is fine for now and that she will explain this to the client admins as needed.

RobStallion commented 6 years ago

After looking into this a little I have seen that the popup comes with default classes that TimeMCE add. Using these classes, we should be able to hide the pop-up by changing the css class to display: none;

This solution will work to hide the pop-up from the users but if TinyMCE ever update the class names it might display the pop up again.

I will implement this solution for now as it should not have any side effects.

RobStallion commented 6 years ago

The solution suggested above will work for all messages sent after this solution is deployed but any messages that were sent beforehand will not be formatted.

I have looked at the database and seen that there is only one message that has been sent so far so this should not be too much of an issue.