CSS Library or Word processor uses class names that start with tw-
-
We have an app with a rich text editor. Users are constantly copying text from some place else and causing print issues. I do my best to strip out offending tags but they keep finding new ones.
This time there was a pre tag with a bunch of tw- classes.
My google-fu has come up short and I can't figure it out.
Just curious.
-
@Karla Is this web or desktop app?
-
@lucas1 said in CSS Library or Word processor uses class names that start with tw-:
@Karla Is this web or desktop app?
Web app.
They often write it up and format it in MS Word and then copy to the RTE in the web app. I know what MS's classes look like.
-
@Karla
Right worked it out (I think). Looks like google translateHow that got into a document I don't know.
-
@lucas1 said in CSS Library or Word processor uses class names that start with tw-:
@Karla
Right worked it out (I think). Looks like google translateHow that got into a document I don't know.
That might be it...they wrote it another language and used google translate to get it in English.
It also has
data-placeholder="Translation"
-
@Karla are the classes conflicting with classes that you're using? Wouldn't it be simpler to just wipe out class names and attributes from the HTML version of what they paste, kind of like we do on posts here?
-
@anotherusername said in CSS Library or Word processor uses class names that start with tw-:
@Karla are the classes conflicting with classes that you're using? Wouldn't it be simpler to just wipe out class names and attributes from the HTML version of what they paste, kind of like we do on posts here?
No, it wasn't the classes. They had no effect. It was the pre tag. Previously, I was only stripping out pre tags with no attributes.