简体   繁体   中英

Google calendar edit event - description not saved when edited by jQuery

I'm trying to write an Chrome extension to fill in the event description in Google Calendar - edit event window. But when I add text there using Jquery: $('textarea').val('test'); and save the event, the description is not saved. Does anybody know how to solve this?

The solution is to insert the text by JS, and focus the field:

        $("#myfield").keyup(function(e){
            //text changed, update description field
            text_tv = $(this).val();
            descr.val('');
            descr.focus(); 
            document.execCommand('insertText', false, convert_to_tv(text_tv));
            $(this).focus();
        });

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM