WYSIWYG guide editor reformats article fonts with <span> tags
RespondidaThis is related to a closed thread: Guide reformats HTML code.
We have our css set up very intentionally with font sizes, colors and widths defined. However, when we write and publish articles using the WYGIWYG editor, Zendesk adds html code that overwrites the css. It is impossible to strip out every instance of this by hand!
Example (the rogue html code is in bold font)
<p>
<span style="font-weight: 400;">The <strong>Galaxy Cloud Environment</strong> is the virtual machine that runs your Galaxy app. It includes:</span>
</p>
Is there any way to stop these additional span styles being added to our code??
-
When writing your articles, are you copying the text from another platform (like Google Docs) and then pasting it into the WYSIWYG editor? That may be the root of the issue.
I've tested these scenarios to see if it would add a <span> tag:
- Enter text directly into the editor: No additional <span> tags
- Copied text from Microsoft Word: No additional <span> tags
- Copied text from Google Doc: <span> tags added (and specifically, the <span style="font-weight: 400;"> tag)
- Copied text from TextEdit (on a Mac): No additional <span> tags, but there is a class added to the <p> tag
If the above applies to you, I'd try changing up where you are copying your text from to see if that helps!
-
We do indeed use Google docs to copy/paste content into Zendesk, so I have no doubt you are right that's the issue. Thanks for the heads up and we will see if we can find a workaround for this.
Por favor, entrar para comentar.
2 Comentários