게시판 » 제작 요청

Setting the font size in google doc (very tricky!)

§
작성: 2018-10-21

Setting the font size in google doc (very tricky!)

Hi! I've written this script: https://gist.github.com/WiliTest/b78ad2c234565ba8ce40df15440540d9 but I don't find the way to change the font size. The help of a js' Guru would be super!

  //---------------full script in the link above-----------------

        function dispatchkeyboard(key) {
            if (key.altKey  &&  key.code === "KeyJ") {

                var divfont = document.getElementById("fontSizeSelect");
                console.log(divfont);
                var inputt = divfont.getElementsByTagName('input')[0];
                inputt.select();
                inputt.value = "6";
                consol.log('done');

                var ev = document.createEvent('Event');
                ev.initEvent('keypress');
                ev.which = ev.keyCode = 13;
                console.log(ev);
                inputt.dispatchEvent(ev);
            }
        }
§
작성: 2024-10-29

Discover the perfect TypeType font for your project. With styles for every aesthetic, our fonts enhance clarity and bring character to your brand’s visual identity: https://typetype.org

댓글 남기기

댓글을 남기려면 로그인하세요.