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
    24 days ago
    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 1208 posts 3922 karma points c-trib
    22 days ago
    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
    21 days ago
    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.

Please Sign in or register to post replies

Write your reply to:

Draft