0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2025-01-03 13:16:31 -05:00

Working: Editor Functionality, testing function call on object

This commit is contained in:
Matthew Borden 2014-07-08 16:10:57 +10:00
parent 15c45cc677
commit 632dd68a2f

View file

@ -29,10 +29,16 @@ $(document).ready(function () {
$(div).load(buildPath + 'Squire-UI.html', function () {
$('.item').click(function () {
var me = $(this);
var iFrame = me.parents('.Squire-UI').next('iframe').first()[0];
var editor = iFrame.contentWindow.document;
var action = me.data('action');
console.log(editor, action);
editor = iFrame.contentWindow.document;
console.log(me.data('action'), me.data('value'));
try {
editor[me.data('action')](me.data('value'));
} catch (error) {
console.log(error);
}
});
});