If you've ever tried to copy and paste some HTML code into a question title or text element, or perhaps you even create your own HTML code by hand, you may have run into a few frustrating roadblocks. Thankfully, these features can be worked around fairly easily—just follow these few short tips below!
HTML Editor and Handwritten Code
With the default WYSIWYG, "HTML Editor" enabled, you might find yourself wondering how to input raw HTML code. The easiest method is to disable the HTML Editor, but you can also input raw HTML even when using the HTML Editor!
- This is done by first clicking into the text field to activate the Editor.
- Clicking the ellipsis icon (…), will expand the toolbar and reveal the rest of the options.
- You should see a Source button along with small piece of paper with
<>
on it. This is the Source Mode button; click this and you have direct access to the source code of the element you are editing!
Please note that if you paste in HTML while not in Source Mode, your HTML markup may end up being encoded. This means that you would see the code itself when you open your live survey, rather than the formatting or visual result you were looking for.
Clean my HTML
The visual HTML Editor isn't the only thing that can affect your HTML. We also fix up many common errors that can otherwise cause problems in your live survey.
- This can include closing un-closed tags and removing invalid tags or attributes.
- We also strip many HTML tags and attributes for security reasons. The most common tag that you might find yourself missing after saving a survey element is the
<script>
tag. If you need to add JavaScript to your survey use our JavaScript Action. - We will also strip the
<font>
tag as it is no longer supported by modern web browsers. Font changes should be performed via the survey Style tab. - You cannot reference local files. If you need to reference a file in your survey, please provide a file URL that is publicly available.
If you have HTML that you simply must include in your survey and it is being stripped, please contact our Support team and mention this article. We will assess whether your HTML can be supported within our security restraints.
Admin
— Dave Domagalski on 08/31/2015
@Bryan: Thank you for exploring SurveyGizmo Documentation! It will likely be best to investigate your specific use-case and implementation - I am going to open a ticket with you to see if I can sort out the trouble; you'll receive an email shortly!
David Domagalski
Survey Explorer
SurveyGizmo Customer Support
— Bryan on 08/28/2015
This was a useful article. Unfortunately, this feature does not work correctly.
I'm writing Java programming quizzes and I need to include code with angle brackets like this:
public List search(Map filters)
So I code the option like this:
public List<Employee> search(Map<String,Object> filters)
But when I save it the HTML is corrupted and looks like this:
public List search(Map filters)
When I go back into the option editor this is what I see:
public List searchEmployees(Map filters)
Wrong! So even when I tell the editor to **NOT** fix my HTML it is ignoring my command.
Please help!
Admin
— Bri Hillmer on 04/30/2015
@Peter: Thanks for this feedback! I definitely agree. We're trying to balance between power users and our users with more basic needs with this feature. I'm going to make note of this and have a discussion with our development team about how to strike a better balance!
Thanks again for your feedback!
Bri
Documentation Coordinator/Survey Sorceress
SurveyGizmo Customer Support
— General on 04/30/2015
The changes you've made to the HTML editor are really rather irksome. Most of the time I simply want to enter/paste plain text but occasionally I want to style question text.
In the past I would just paste into the plain text box safe in the knowledge that all styles would be removed. Now I have to click the ... for full mode, click the paste from word option, paste, then click ok.