Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Special copy/paste handler for math. #84

Merged
merged 17 commits into from
Oct 18, 2013
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add a copy button to the math popover
izak committed Oct 16, 2013
commit 278e6c6bd00b98d088d15d9d9c8fd9d472346352
2 changes: 1 addition & 1 deletion src/plugins/oer/math/css/math.css
Original file line number Diff line number Diff line change
@@ -102,6 +102,6 @@ math,
background-image: url(../img/remove-02.png);
}

button.done {
button.done, button.copy {
float: right;
}
3 changes: 3 additions & 0 deletions src/plugins/oer/math/lib/math-plugin.coffee
Original file line number Diff line number Diff line change
@@ -61,6 +61,7 @@ define [ 'aloha', 'aloha/plugin', 'jquery', 'overlay/overlay-plugin', 'ui/ui', '
<input type="radio" name="mime-type" value="text/plain"> Plain text
</label>
<button class="btn btn-primary done">Done</button>
<button class="btn copy">Copy</button>
</div>
</div>
'''
@@ -329,6 +330,8 @@ define [ 'aloha', 'aloha/plugin', 'jquery', 'overlay/overlay-plugin', 'ui/ui', '
$editor.find('.remove').on 'click', =>
$span.trigger 'hide-popover'
cleanupFormula($editor, $span, true)
$editor.find('.copy').on 'click', =>
Copy.buffer $span.outerHtml(), 'text/oerpub-content'

$formula = $editor.find('.formula')

5 changes: 4 additions & 1 deletion src/plugins/oer/math/lib/math-plugin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.