14-day Cloud trial
Start today. For free.

One editor. 50+ features. Zero constraints. After your trial, retain the advanced features.

Try Professional Plan for FREE
PricingContact Us
Log InGet Started Free

How to create 3D text effects in your rich text editor

May 31st, 2023

5 min read

the number 3 and letter D presented in isometric view showing one kind of 3D effect

Written by

Joe Robinson

Category

How-to Use TinyMCE

When an unusual support request comes in that involves changing something about your app’s design features, it can be intriguing. But it can just as quickly become frustrating, when it involves failed attempts to create 3D text effects. 

For instance, you have big hopes that the editor in your app can create 3D text effects. But it can’t. Rather than venting your frustrations on the failed component perhaps consider integrating a replacement editing component that’s effortlessly customizable and handles design changes like creating 3D text effects.

TinyMCE has the power to change appearance and match the needs of many large-scale and subtle UI design demands. 

This tutorial explains how to create 3D text effects in TinyMCE with the application of a few CSS properties and TinyMCE customization options. 

3D text fonts and their impact on design

Typography is the discipline of arranging text to create visual appeal. Once 3D typography arrived in the 1990s, it helped to move website design forward – from a small set of fonts and typography styles, to a broader range of options. 

As browsers became increasingly sophisticated, and the second version of CSS was adopted, designers took advantage of the new resources to design boldly. They began using new directionality features, to create 3D text effects that added a sense of depth, dimensionality, and realism to typography. 

The design world has never looked back.

Working with 3D text in your CSS

Text-shadow is one of the important CSS properties to know about, when working with 3D text in your CSS. Other important properties that define 3D text effects in a rich text editor component are Transform and Box-shadow

You’ll need an understanding of all these properties in order to work with 3D text in your CSS:

1. Text-shadow and 3D text

The Text-shadow  property was first released in the 1998 CSS 2 specification. The MDN docs contain examples of how it’s used. There are also Text-shadow Online Generators available, which are helpful for working with 3D text – so you can see the result of the CSS, and iterate rapidly.

2. Box-shadow and 3D text

The Box-shadow property gives you the ability to place a box-shaped shadow under an element, and was introduced in 2011 with Internet Explorer version 9. The MDN docs have their own Box-shadow Generator available for rapid iteration.

3. Transform and 3D text

The Transform property first arrived for web designers to use in 2011, and was one of the first kinds of web application animation options available. The MDN docs on animation provide background, while the Transform docs show different ways to use the property. The rotateX, rotateY, and rotateZ values are particularly useful to create 3D text effects.

How to create 3D text effects in a rich text editor

Depth is essential for 3D text effects. The z-axis CSS values provide that sense of depth. When an object moves along the z-axis, relative to the point of view of the audience looking at the screen, you can introduce depth, and create 3D text effects. The following demo shows how it’s done, in TinyMCE.

First, though, you need an API key. This key gives you free access to TinyMCE Premium plugins for 14 days, and also prevents any warnings concerning domain names from appearing in the text area. Navigate to the Get-tiny sign up page to get your FREE rich text editor API key

  1. Create an index.html file, and add the following HTML:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>TinyMCE Demo</title>
</head>
    <body>
    </body>
</html>
  1. With your file open, in the head section, add script tags, and reference TinyMCE Cloud through a CDN link within the script tags. This is what the link looks like:

<script
  src="https://cdn.tiny.cloud/1/your-api-key/tinymce/6/tinymce.min.js"
  referrerpolicy="origin"
></script>;

Note: For the Tiny Cloud connection, creating an account with TinyMCE gets you a FREE API key. When you use this key, you get access to Premium TinyMCE plugins for 14 days, as well as no warning messages concerning API keys in the text area.

  1. Add another pair of script tags, add the following JavaScript. It’s the tinymce.init method, and it’s how you control TinyMCE:

<script>
   tinymce.init({
   selector: '#editor',
   plugins: 'powerpaste casechange searchreplace autolink directionality advcode visualblocks visualchars image link media mediaembed codesample table charmap pagebreak nonbreaking anchor tableofcontents insertdatetime advlist lists checklist wordcount tinymcespellchecker editimage help formatpainter permanentpen charmap linkchecker emoticons advtable export autosave',
   toolbar: 'undo redo print spellcheckdialog formatpainter | blocks fontfamily fontsize | bold italic underline forecolor backcolor | link image | alignleft aligncenter alignright alignjustify lineheight | checklist bullist numlist indent outdent | removeformat',
   height: 600,
   width: 700,
       });
</script>
  1. Add initial HTML content, and the CSS selector class to some textarea tags. The selector is set as an id with the value “editor” in the TinyMCE init script:

<textarea id="editor">
  <p>Hello, 3D Text!</p>
</textarea>;
  1. Test run the index.html file by opening it in your browser, or use a local server command with Python or with the PHP command. The demo editor should look something like this example:

TinyMCE demo working in the browser.

Creating the 3D text effects

Creating 3D text effects in the TinyMCE rich text editor can be done directly with the style_css option. The following CSS adds the effect of depth needed to convey a 3D effect. It does this using the transform and text-shadow properties.

  1. Add the content_style option to the TinyMCE init script:

tinymce.init({
        selector: '#editor',
        plugins: 'powerpaste casechange searchreplace autolink directionality advcode visualblocks visualchars image link media mediaembed codesample table charmap pagebreak nonbreaking anchor tableofcontents insertdatetime advlist lists checklist wordcount tinymcespellchecker editimage help formatpainter permanentpen charmap linkchecker emoticons advtable export autosave',
        toolbar: 'undo redo print spellcheckdialog formatpainter | blocks fontfamily fontsize | bold italic underline forecolor backcolor | link image | alignleft aligncenter alignright alignjustify lineheight | checklist bullist numlist indent outdent | removeformat',
        height: 600,
        width: 700,
        content_style: ` `
  1. Include the following CSS to adjust the size and shape of paragraphs within the rich text editor:

content_style: `
          p {
              position: relative;
              padding: 10px;
              width: 500px;
              height: 500px;
            }`;
  1. Include the Transform property to change the position of the paragraph element, making use of the z-axis to create depth:
content_style: `
          p { 
              position: relative;
              padding: 10px;
              width: 500px;
              height: 500px;
              transform: rotateX(-60deg) rotateY(0deg) rotateZ(45deg);
  1. Include the Text-shadow property with the following values:

content_style: `
          p { 
              position: relative;
              padding: 10px;
              width: 500px;
              height: 500px;
              transform: rotateX(-60deg) rotateY(0deg) rotateZ(45deg);
              text-shadow:

              1px 1px #A3AEC2,
              2px 2px #A3AEC8,
              3px 3px #A3AED6,
              4px 4px #A3AEE2;
  1. Set the default font size to 24:

content_style: `
          p { 
              position: relative;
              padding: 10px;
              width: 500px;
              height: 500px;
              transform: rotateX(-60deg) rotateY(0deg) rotateZ(45deg);
              text-shadow:

              1px 1px #A3AEC2,
              2px 2px #A3AEC8,
              3px 3px #A3AED6,
              4px 4px #A3AEE2;

              font-size: 24pt;

         } `;
  1. Add some preview text to the textarea element:

    <textarea id="editor">
       <p>Testing 3D effects</p>
    </textarea>
  1. Save the changes, and check on the 3D text effects in the rich text editor:

The 3D text effect working in the TinyMCE rich text editor

3D text effect example

The following example shows 3D text effects in the rich text editor, and expands on the demo in the previous section by making use of the Box-shadow effect inspired by the isometric, 3D effect tutorial by Louie Rootfield:

Additional text effects and designs for TinyMCE

There are other effects you can include, such as neon and glowing text, scrolling text, or alternative skins for TinyMCE. Read the following articles for more information:

Contact us if you have any further questions on getting set up and ease of implementation with TinyMCE, especially if you have a 3D text effect or similar design plan for your application with TinyMCE.

DesignCSSTinyMCE
byJoe Robinson

Technical and creative writer, editor, and a TinyMCE advocate. An enthusiast for teamwork, open source software projects, and baking. Can often be found puzzling over obscure history, cryptic words, and lucid writing.

Related Articles

  • How-to Use TinyMCEMar 28th, 2024

    How to view and restore document version history in TinyMCE

Join 100,000+ developers who get regular tips & updates from the Tiny team.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Tiny logo

Stay Connected

SOC2 compliance badge

Products

TinyMCEDriveMoxieManager
© Copyright 2024 Tiny Technologies Inc.

TinyMCE® and Tiny® are registered trademarks of Tiny Technologies, Inc.