Google fonts and TinyMCE

后端 未结 6 1494
长情又很酷
长情又很酷 2020-12-16 13:55

Can google fonts be used with tinyMCE? how can this be done?

6条回答
  •  半阙折子戏
    2020-12-16 14:14

    I finally solved my problem. After search more than two hour and no solution.

    I just add font-face in TinyMCE CSS.

    Do this:

    1 - Download your google font and past it on your font folder ( Any path you want ) 2 - Go to tinymce\js\tinymce\skins\lightgray and open content.min.css

    add

     @font-face {
        font-family: Questrial;
        src: url("fontfolder/yourfont.ttf");
    }
    

    in first line before "body".

    that's going to be like that

    @font-face {
        font-family: Questrial;
        src: url("../../../../../../font/questrial.ttf");
    }body{background-color:#FFFFFF;color:#000000;font-family:Verdana,Arial,Helvetica,sans-s.............
    

    and here we are!!!! You got it, simple but HARRRRRRRRD to find! Enjoy it and share this solution.

提交回复
热议问题