visual editor

Visual Editor Altering HTML

Description

You edited a page through the Text editor, but when you switch to Visual editor, some of the HTML you added changes or is removed.

This is known to happen specifically when adding Bootstrap Collapsible Accordion Menus and anchors but may happen with other bits of code as well.

Accordions

If you add a collapsible accordion menu to your page through the text editor, it deletes the following line of code from every panel:

<a class="collapsed" href="#PanelID" data-toggle="collapse" data-parent="#accordion">

It also deletes the corresponding </a>. Note that this <a> tag wraps each .panel-heading div.

Anchors

Sometimes when you add an anchor on a page, it will later disappear. This does not happen all the time but it appears to happen by either adding an anchor in the Visual editor, switching to text editor, and switching back to Visual, or adding an anchor in the text editor and switching to Visual.

Steps to Fix the Issue

Because there is no known solution for this issue, the best thing to do would be to avoid going back into Visual editor on any page that has a collapsible accordion menu/anchor. If you do go into Visual editor, you could do one of two things:

  • Click Browse next to Revisions in the Publish box and restore the latest version that had the full code (if there are any).
  • Go back and manually re-add the code yourself.

Other Code

If the above suggestions do not solve your issue or you’ve found other code that the Visual editor alters, please email us at webdev@uconn.edu.

IFrames

Aurora has limited support for the use of iFrames. For security reasons, UITS must be extremely cautious in what domains to trust not to infect the many hundreds of websites that use Aurora. Currently, Aurora only permits the use of iFrames from the Google.com domain. This allows for the inclusion of:

  • Google Maps
  • Google Calendars
  • Google Docs, Spreadsheets, Presentations, and Drawings.

Using IFrames

IFrames must be entered in the text editor, not the visual editor. Pasting an iFrame into the visual editor will do nothing but display a lot of raw HTML code on your webpage.

This is an example iFrame code, taken from the Google Maps iFrame shown below:

<iframe src="https://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=Homer+Babbidge+Library,+Fairfield+Way,+Storrs,+CT&amp;aq=0&amp;oq=homer+&amp;sll=41.782143,-72.236374&amp;sspn=0.293388,0.600128&amp;ie=UTF8&amp;hq=Homer+Babbidge+Library,&amp;hnear=Fairfield+Way,+Storrs,+Connecticut&amp;ll=41.806595,-72.251727&amp;spn=0.006295,0.006295&amp;t=m&amp;output=embed" width="100%" height="250" frameborder="0"></iframe>

<small><a style="color: #0000ff;text-align: left" href="https://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=Homer+Babbidge+Library,+Fairfield+Way,+Storrs,+CT&amp;aq=0&amp;oq=homer+&amp;sll=41.782143,-72.236374&amp;sspn=0.293388,0.600128&amp;ie=UTF8&amp;hq=Homer+Babbidge+Library,&amp;hnear=Fairfield+Way,+Storrs,+Connecticut&amp;ll=41.806595,-72.251727&amp;spn=0.006295,0.006295&amp;t=m">View Larger Map</a></small> 

For directions on getting your iFrame code, click the following tutorial links:

Examples

Google Maps

View Larger Map

Google Calendar

Google Docs

Google Slides

Videos

Embedding Videos

You can add videos from YouTube or Vimeo into your Aurora site. The process is the same for either site.

To do so:

  1. Copy the URL of the video
  2. Paste it into either the visual editor or the text editor. It does not matter which.
  3. Add an embed shortcode before it, and a /embed shortcode after it. For example:
  4. If you would like to fix a width, add this in your embed shortcode. The measurement is automatically taken in pixels, so if you type width="280" it means 280px. For example:

    Note that this acts as a maximum width — the video will never be wider but may shrink if the browser width is too narrow.

Uploading Videos

Alternately, you can upload a raw MP4 or OGG video file, and use the 'Add Media' button to add it to a page.

Warning: You only get so much space on an Aurora site, and videos can be quite large. You may want to reconsider adding long videos or HD videos.

Be sure to remove the width and height attributes to get a responsive video size.