You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it on the clipboard with a different content type. This will prevent the
cleanup that the browser does on namespaces. Use this alternative content
type again when pasting. Prevent the browser default. This will only work
in browsers that support event.clipboardData, chrome and safari to date.
editable.obj.on 'copy', (e) ->
content = e.oerContent or Aloha.getSelection().getRangeAt(0).cloneContents()
$content = $('<div />').append(content)
# If there is math among the content we're copying, treat it specially.
# Check that we also have a script tag in our selection, that occurs
# towards the end of the math and ensures we have the whole of it.
# The idea is to only do custom copy/paste if we need it, and let the
# browser handle other content. Also buffer it in our local copy buffer.
if $content.has('span.math-element').length and $content.has('script').length
e.preventDefault()
clipboard = e.clipboardData or e.originalEvent.clipboardData
Phil's comments: can this follow the custom vendor mimetype recommendations and be application/vnd.oerpub+text? (or, as a fallback, text/x-oerpub). Also, since it is used several times in the file can it be moved up as a const to the top of the file?
src/plugins/oer/math/lib/math-plugin.coffee
Lines 143-158
it on the clipboard with a different content type. This will prevent the
cleanup that the browser does on namespaces. Use this alternative content
type again when pasting. Prevent the browser default. This will only work
in browsers that support event.clipboardData, chrome and safari to date.
Phil's comments: can this follow the custom vendor mimetype recommendations and be application/vnd.oerpub+text? (or, as a fallback, text/x-oerpub). Also, since it is used several times in the file can it be moved up as a const to the top of the file?
The text was updated successfully, but these errors were encountered: