diff --git a/src/translation/editor/translation_editor.html b/src/translation/editor/translation_editor.html index 775941c..e92f6d1 100644 --- a/src/translation/editor/translation_editor.html +++ b/src/translation/editor/translation_editor.html @@ -171,6 +171,20 @@

Languages

}, 4); } + function copy_export_json_to_clipboard(translation_id) { + const export_maps = get_export_data(translation_id); + console.log('Exporting data for ' + translation_id, export_maps); + const jsonified_data = map_to_json(export_maps); + console.log('JSONified data: ', jsonified_data); + navigator.clipboard.writeText(jsonified_data).then(function() { + console.log('Copied to clipboard'); + // should have some sort of overlay that fades away + // that confirms the export was successful.... + }, function() { + console.log('Failed to copy to clipboard'); + }); + } + $(document).ready(function() { let promises_of_loaded_data = []; @@ -197,12 +211,8 @@

Languages

$('#tabs').append($('
').attr('id', $section)); let $tabdata = $(`#${$section}`); // Add a button to tabdata to export the data - $tabdata.append( - $('