• Sean Hammond's avatar
    Render YouTube and Vimeo links as video embeds · e5beb610
    Sean Hammond authored
    Client-side, replace any links to YouTube or Vimeo videos in annotation
    body texts with <iframe> video embeds for those same videos.
    
    Behind a new feature flag.
    
    markdown.coffee: after rendering the user's markdown text to HTML and
    sanitizing it, compile the HTML string into a DOM element and insert it into
    the DOM using innerHTML from JavaScript, instead of using Angular's
    ng-bind-html to insert the HTML string into the DOM.
    
    This means that our CoffeeScript code in markdown.coffee has the rendered
    annotation body as a DOM element, and can use the DOM API to modify it before
    inserting it into the DOM.
    
    Take advantage of this to find video links in the HTML and replace them with
    embeds. This is done by a standalone media-embedder.js module that
    markdown.coffee calls.
    
    This module is designed to allow functions for generating embeds for different
    kinds of URLs to be plugged in. So far functions for a few different kinds of
    YouTube and Vimeo URLs are implemented, but further functions for more
    media types can be added.
    e5beb610
Name
Last commit
Last update
..
annotator Loading commit data...
front-page Loading commit data...
mixins Loading commit data...
vendor Loading commit data...
admin.scss Loading commit data...
annotations.scss Loading commit data...
app.scss Loading commit data...
base.scss Loading commit data...
common.scss Loading commit data...
dropdown-menu-btn.scss Loading commit data...
elements.scss Loading commit data...
excerpt.scss Loading commit data...
flashbar.scss Loading commit data...
footer.scss Loading commit data...
forms.scss Loading commit data...
grid.scss Loading commit data...
group-form.scss Loading commit data...
header.scss Loading commit data...
help-page.scss Loading commit data...
home.scss Loading commit data...
markdown-editor.scss Loading commit data...
modal.scss Loading commit data...
page.scss Loading commit data...
primary-action-btn.scss Loading commit data...
publish-annotation-btn.scss Loading commit data...
reset.scss Loading commit data...
search-status-bar.scss Loading commit data...
share-link.scss Loading commit data...
signin-control.scss Loading commit data...
simple-search.scss Loading commit data...
site.scss Loading commit data...
spinner.scss Loading commit data...
styled-text.scss Loading commit data...
tags-input.scss Loading commit data...
threads.scss Loading commit data...
top-bar.scss Loading commit data...
util.scss Loading commit data...
variables.scss Loading commit data...