Text editors

Why does a CSS style keep getting injected into my text?

 
Picture of Matthew Cook
Why does a CSS style keep getting injected into my text?
 
style="background-color: rgb(255, 255, 255); font-size: 1rem;"

keeps getting injected into my Atto text boxes around random links. This is very annoying.

Is there any way of avoiding this?

 
Average of ratings: -
Picture of Sam Mudle
Re: Why does a CSS style keep getting injected into my text?
Particularly helpful Moodlers

Which version of moodle?

 
Average of ratings: -
Picture of Matthew Cook
Re: Why does a CSS style keep getting injected into my text?
 

Moodle 3.4. It may only be happening when I use the HTML mode, I'm not sure.

But it doesn't seem to be from me pasting something that includes that style.

 
Average of ratings: -
John Provasnik at Moodle Moot US
Re: Why does a CSS style keep getting injected into my text?
Particularly helpful Moodlers

Hello - when you paste something into Atto from outside of Moodle, you may want to first paste your content into a program like TextWrangler or JumpCut so it can ensure any excess code is stripped out. If you paste something into Atto, click on the HTML icon and see if you see any strange code (before you save the page) that you did not intend to add. Atto has a PasteSpecial plug in that I've used. it doesnt strip everything out, but it does catch some things. 


Then... then there is the issue where everything looks fine but as soon as I go back into edit mode of the activity, Atto has injected many things. For that scenario I've created a tracker in case you have any additional things to share: https://tracker.moodle.org/browse/MDL-63365 

 
Average of ratings: -
Picture of Matthew Cook
Re: Why does a CSS style keep getting injected into my text?
 

Hi John,

Thanks for your comments. My issue is the second one - the unwanted code appears on saving and appears even when no material has been pasted into the textbox.

I only ever get:

style="background-color: rgb(255, 255, 255); font-size: 1rem;"

Matthew

 
Average of ratings: -