DEV Community

Cover image for How To Change Font In WordPress Text Editor
IderaDevTools
IderaDevTools

Posted on

How To Change Font In WordPress Text Editor

As the World Wide Web has evolved significantly it is more critical than ever to establish an impactful, functional website, which serves as a vital tool for personal branding. Who doesn’t want to multiply their earnings by standing distinct from the crowd? WYSISYG editors are a great way of building interactive websites without indulging in the complexities of code. Most professional web developers utilize WordPress text editor to create and update their websites, which includes visuals and interactive content. It’s a dream come true to be able to do all of this without writing a single line of code. Although it is practical to employ Rich-text editor JS for beautifying your website. The majority of people are unaware of how to change the font in the WordPress editor.

If you are one of those people you don’t need to worry because in this article we are going to discuss the applications and features of the perfect WordPress text editor along with the directions to change its font. Read on to find out more about the best WYSIWYG HTML editor and how to get started with it.

Table of Contents

Why Custom Fonts are Crucial for a Website HTML Editor?

Image description

Fonts are integral to your success. Your website is the front page of your services therefore it needs to be interactive and eye-catching. The font and styling should be in such a manner that your services stand apart and are distinct from others. As a result clients and potential buyers are more likely to flock to your shop. Well if you are looking to style your website and make it look more professional, your search for the best WYSIWYG javascript editor ends here. Froala’s Angular WYSIWYG HTML editor support is one of the best in business. It offers basic styling options along with advanced styling through the integration of plugins. In addition, his Froala enables you to define your own style class and therefore customize how the output of the editor looks like.

Contrary to popular belief and practice Froala’s rich text editor angular does not use the tag at all. As a result, you have the ability and control to change font size with pixel precision. Therefore you have the option to fine tailor the size without having to select a size that is too large or too small. In addition to this, users can also choose to form the diverse family of fonts available as well as they can also apply their own custom font. Above all, users have the ability to change the aesthetics according to their liking. They can completely change the text or background color to suit their liking.

How to Change Font in WordPress Text Editor?

It is frustrating to be stuck with the same old and boring font for styling your website. Nobody wants to look at monotonous and evenly spaced out letters anymore, the current dynamic demands that the website is visually appealing through colorful and bold fonts. In order to set up a custom font with Froala, you will need the font_family.min.js plugin. You must first add the typeface on your website. We’re using four Google fonts in this example: Roboto, Oswald, Montserrat, and Open Sans Condensed. The fontFamily option is then used to specify which fonts should display in the Font Family menu. This option is an Object with a key that indicates the font name (exactly as the font-family CSS rule, e.g. font-family: ‘Roboto’, sans-serif;) and a value that reflects the font name in the dropdown list, e.g. Roboto:

<!-- Include the plugin file. -->
<script src="../js/plugins/font_family.min.js"></script>
<script>
  new FroalaEditor('div#froala-editor', {
    fontFamily: {
      "Roboto,sans-serif": 'Roboto',
      "Oswald,sans-serif": 'Oswald',
      "Montserrat,sans-serif": 'Montserrat',
      "'Open Sans Condensed',sans-serif": 'Open Sans Condensed'
    },
    fontFamilySelection: true
  })
</script>
Enter fullscreen mode Exit fullscreen mode

How to Get Started with WordPress Froala WYSIWYG Editor?

Getting started with the best WYSIWYG WordPress editor is relatively simple. There are actually two ways to go about the installation of Froala. Either you can use GitHub to download it manually or you can just add it as a WordPress admin. We will go through both procedures in this post. In order to download it manually, you just need to head over to Froala’s GitHub repo and download the contents. Then make a new folder beneath the plugins folder in your WordPress installation wizard. After this step, you can finally copy Froala to the newly created folder and enjoy it as a plugin in the WordPress admin area.

But if you want to follow a simpler process, we recommend using the WordPress admin area to add Froala as a plugin by following the automated process. Now that you have gotten started with Froala, let us teach you how you can seamlessly integrate Froala into WordPress. You will begin by visiting the WordPress admin area and heading over to the Plugins page. After this, we simply have to activate the Froala plugin and you have now successfully integrated Froala into WordPress.

What Makes Froala An Ideal WordPress Text Editor?

Image description

Thousands of client testimonials from all around the world show how effectively Froala responds to the individual demands of each customer. It is trusted and adored by thousands of organizations and individuals, ranging from startups to Fortune 100 corporations. Now Froala’s integration with WordPress opens up a new doorway of opportunities for aspiring web developers.

From lightning-fast data and visual processing to a powerful API and total customizability, it has it all. Froala is your only option if you want to completely boost your company’s output and set yourself out from the competition. Froala is the way to go if you really want to boost your website’s traffic and improve the underlying SEO. It not only offers a vast array of market competitive features but also allows users to style their websites by applying custom fonts. There is no better option out there if you want to market your services effectively.

So What are You Waiting for? Join us now and enhance your Website development experience!

Top comments (1)

Collapse
 
digital_hub profile image
hub

good day dear Idera Dev people,

many thank you so much for spending your time creating and posting this article. i just found your article and i like it. The way you talk about the discussion on working with CSS.
Many thanks for the article it is just great!! It looks very promising. Many thanks for your inspiring ideas.

i am currently working on some issues - that have to do with the CSS and google fonts.

to begin with the beginning:i have found out that my wordpress-site fetches two google fonts:

one of them is montserrat

i decided to host them locally. so i have to

a. fetch the fonts
b. correct the css code

with the following tool i fetch them

google-webfonts-helper.herokuapp.c...

here i have the option to add the paths - to customize the path in the css-data

/* montserrat-regular - latin / u/font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 400; src: url('../fonts/montserrat-v25-latin-regular.eot'); / IE9 Compat Modes / src: local(''), url('../fonts/montserrat-v25-latin-regular.eot?#iefix') format('embedded-opentype'), / IE6-IE8 / url('../fonts/montserrat-v25-latin-regular.woff2') format('woff2'), / Super Modern Browsers / url('../fonts/montserrat-v25-latin-regular.woff') format('woff'), / Modern Browsers / url('../fonts/montserrat-v25-latin-regular.ttf') format('truetype'), / Safari, Android, iOS / url('../fonts/montserrat-v25-latin-regular.svg#Montserrat') format('svg'); / Legacy iOS */ } Customize folder prefix (optional):

and now i have to add a path to set the correct path - (that means to customize the path )

../fonts/

some additional thought: what makes me wonder is the fact that some of the examples show full paths as reference - others dont:

see the following examples;

a. wp-ninjas.de/wordpress-google-font...

url("https://wp-ninias.de/fonts/muilti-latin-300.woff2") format (
url("https://wp-ninias.de/fonts/muilti-latin-300.woff") format (

b. pixelgrade.com/docs/advanced-custo...

Copy the URL Path field and paste it before each URL in the Embed Code field. The example code will look like this:

@font-face {
font-family: 'Name of the font';
src: url('http://yourwebsite.com/wp-content/uploads/fonts/11148/name-of-the-font-file.woff2') format('woff2'),
url('http://yourwebsite.com/wp-content/uploads/fonts/11148/name-of-the-font-file.woff') format('woff');
}

c. themeisle.com/blog/custom-fonts-wo...

Once the file is in place, open up your child theme’s stylesheet. Now you’ll need to call on that font so you can use it, via a snippet that should look like this:

`

@font-face {
font-family: New Font;
src: url(yourwebsite.com/wp-content/themes/...);
font-weight: normal;
}

`

and now compare it with the following example here:

  1. Copy CSS: (default is Best Support) Modern Browsers Choose Best Support if old browsers still need to be supported. Formats in this snippet: [eot,woff,woff2,ttf,svg]

Code:
/* montserrat-regular - latin */
@font-face {
font-family: 'Montserrat';
font-style: normal;
font-weight: 400;
src: url('../fonts/montserrat-v25-latin-regular.eot'); /* IE9 Compat Modes */
src: local(''),
url('../fonts/montserrat-v25-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/montserrat-v25-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
url('../fonts/montserrat-v25-latin-regular.woff') format('woff'), /* Modern Browsers */
url('../fonts/montserrat-v25-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fonts/montserrat-v25-latin-regular.svg#Montserrat') format('svg'); /* Legacy iOS */

see the helper-tool google-webfonts-helper.herokuapp.c...

**the question: **so the question is: how to set the path correct for the CSS... which path should we use here!?

Dear Idera friends i look forward to hear from you