~ubuntu-branches/ubuntu/utopic/moodle/utopic

« back to all changes in this revision

Viewing changes to lib/editor/tinymce/tiny_mce/3.5.8/plugins/example/js/dialog.js

  • Committer: Package Import Robot
  • Author(s): Thijs Kinkhorst
  • Date: 2014-05-12 16:10:38 UTC
  • mfrom: (36.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20140512161038-puyqf65k4e0s8ytz
Tags: 2.6.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
tinyMCEPopup.requireLangPack();
2
 
 
3
 
var ExampleDialog = {
4
 
        init : function() {
5
 
                var f = document.forms[0];
6
 
 
7
 
                // Get the selected contents as text and place it in the input
8
 
                f.someval.value = tinyMCEPopup.editor.selection.getContent({format : 'text'});
9
 
                f.somearg.value = tinyMCEPopup.getWindowArg('some_custom_arg');
10
 
        },
11
 
 
12
 
        insert : function() {
13
 
                // Insert the contents from the input into the document
14
 
                tinyMCEPopup.editor.execCommand('mceInsertContent', false, document.forms[0].someval.value);
15
 
                tinyMCEPopup.close();
16
 
        }
17
 
};
18
 
 
19
 
tinyMCEPopup.onInit.add(ExampleDialog.init, ExampleDialog);