Custom fonts

This example shows how to connect Google Font to show custom font for content.

    Demo

    Code

    <!DOCTYPE html>
    <html>
    <head>
        <title>Article Editor</title>
        <meta charset="utf-8">
    
        <!-- css -->
        <link rel="stylesheet" href="/your-article-dist-path/article-editor.min.css" />
    
    </head>
    <body>
        <!-- element -->
        <textarea id="entry">
            <p>Content</p>
        </textarea>
    
        <!-- js -->
        <script src="/your-article-dist-path/article-editor.min.js"></script>
    
        <!-- call -->
        <script>
        ArticleEditor('#entry', {
            css: '/your-article-dist-path/',
            custom: {
                css: [
                    // google font
                    'https://fonts.googleapis.com/css?family=PT+Serif:400,400i,700,700i&display=swap',
    
                    // font family changing styles for body content
                    '/your-article-dist-path/my-content.css'
                ]
            }
        });
        </script>
    </body>
    </html>