Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • David Philippe 10 posts 51 karma points
    Sep 26, 2020 @ 16:28
    David Philippe
    0

    RTE / Formats / Google fonts

    Hi everyone

    Quick question regarding the format dropdown in RTE. Is it possible for the styles therein to use Google fonts? and if so how?

    Thanks

  • Steve Morgan 1278 posts 4216 karma points c-trib
    Sep 28, 2020 @ 11:44
    Steve Morgan
    101

    Hi David,

    Create a file in your /css/ folder - I tend to call mine RTEStyles.css and import the external font.

    Add:

    @import url('https://fonts.googleapis.com/css2?family=Permanent+Marker&display=swap');
    
    body {
    }
    
    /**umb_name:Heading*/
    h1 {
        color: red;
        font-family: 'Permanent Marker', cursive;
    }
    

    Then go and add this stylesheet to your RTE Data type(s).

    enter image description here

    You should now see the style sheet as an option in the formats dropdown.

    enter image description here

    Just remember to add the import to your front end styles too or it won't do anything.

  • David Philippe 10 posts 51 karma points
    Sep 29, 2020 @ 16:35
    David Philippe
    0

    Hi Steve

    Thanks for help. I had tried something similar i.e. @import but without the single quote around the font name in the CSS and that seems to have done the trick.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies