Skip to content
Hardware & AMCBeginner

How to Add a WYSIWYG Editor in PHP Pages Using TinyMCE and Trumbowyg

A WYSIWYG (What You See Is What You Get) editor makes it easier for users to edit and format content on websites, blogs, or knowledgebase platforms — without...

BI
Bison Technical Team Enterprise IT specialists
Updated 12 Jun 2025 2 min read 299 total views

A WYSIWYG (What You See Is What You Get) editor makes it easier for users to edit and format content on websites, blogs, or knowledgebase platforms — without writing raw HTML. Popular options like TinyMCE and Trumbowyg are free, customizable, and easy to integrate into any PHP-based application.


? 1. Add TinyMCE to a PHP Page

✅ Step 1: Include TinyMCE via CDN

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

✅ Step 2: Add the Textarea and Activate Editor

html
<textarea name="content" id="editor"></textarea> <script> tinymce.init({ selector: '#editor', height: 300, plugins: 'advlist autolink lists link image charmap preview anchor code', toolbar: 'undo redo | formatselect | bold italic | alignleft aligncenter alignright | bullist numlist | code' }); </script>

✅ Step 3: Handle in PHP

php
$content = $_POST['content'] ?? ''; echo $content; // Save to DB or display

? 2. Add Trumbowyg to a PHP Page

✅ Step 1: Include Trumbowyg via CDN

html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/trumbowyg@2.25.1/dist/ui/trumbowyg.min.css"> <script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/trumbowyg@2.25.1/dist/trumbowyg.min.js"></script>

✅ Step 2: Add the Textarea and Activate Editor

html
<textarea id="trumbowyg_editor" name="content"></textarea> <script> $('#trumbowyg_editor').trumbowyg(); </script>

✅ Step 3: Handle in PHP

php
$content = $_POST['content'] ?? ''; echo $content;

? Use Cases:

  • Blog post editors

  • CMS backends

  • Knowledgebase content

  • Customer support ticket replies

  • Email templates

YOUR FEEDBACK

Was this guide useful?

Your answer helps us keep BISONKB accurate and practical.

BISON AI

Ask about “How to Add a WYSIWYG Editor in PHP Pages Using TinyMCE and Trumbowyg”

This interface is ready to connect to your preferred AI provider. No article or user data is sent until that service is configured.

THE BISON BRIEF

Practical IT knowledge, once a week.

New troubleshooting guides, scripts and infrastructure notes. No noise.

By subscribing, you agree to our privacy policy.