TinyMCE Editor Integration into CMS

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1212
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    852
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    815

TinyMCE Editor Integration into CMS

TinyMCE is a mature WYSIWYG editor with rich plugin ecosystem. Suitable for non-technical users who need to format content without HTML knowledge. Cloud version (API key, CDN) and self-hosted available.

Installation (self-hosted)

npm install tinymce
import { Editor } from '@tinymce/tinymce-react';

function ContentEditor({ value, onChange }) {
    return (
        <Editor
            tinymceScriptSrc="/tinymce/tinymce.min.js"
            value={value}
            onEditorChange={(content) => onChange(content)}
            init={{
                height:   600,
                language: 'en',
                plugins: [
                    'advlist', 'autolink', 'lists', 'link', 'image',
                    'charmap', 'preview', 'anchor', 'searchreplace',
                    'visualblocks', 'code', 'fullscreen', 'insertdatetime',
                    'media', 'table', 'wordcount'
                ],
                toolbar: 'undo redo | formatselect | bold italic | '
                       + 'alignleft aligncenter alignright | '
                       + 'bullist numlist | link image media | code fullscreen',
                content_css: '/css/editor-content.css',
                images_upload_handler: async (blobInfo) => {
                    const formData = new FormData();
                    formData.append('image', blobInfo.blob(), blobInfo.filename());
                    const response = await fetch('/api/media/upload', {
                        method: 'POST',
                        body: formData
                    });
                    const data = await response.json();
                    return data.url;
                }
            }}
        />
    );
}

Image Upload

TinyMCE supports three approaches:

  • images_upload_handler — custom upload function (shown above)
  • images_upload_url — endpoint URL, TinyMCE sends POST itself
  • Media manager via tinydrive plugin (paid)

HTML Sanitization on Server

TinyMCE generates HTML saved to database. Before saving—mandatory sanitization:

// composer require ezyang/htmlpurifier
$config = HTMLPurifier_Config::createDefault();
$config->set('HTML.Allowed', 'p,br,strong,em,a[href|title],ul,ol,li,h2,h3,h4,blockquote,img[src|alt|width|height],table,thead,tbody,tr,th,td');
$config->set('AutoFormat.AutoParagraph', false);

$purifier = new HTMLPurifier($config);
$cleanHtml = $purifier->purify($request->content);

Styling Content on Public Site

HTML from TinyMCE needs styling on public site via prose classes (Tailwind Typography):

<div
    className="prose prose-lg max-w-none"
    dangerouslySetInnerHTML={{ __html: sanitizedContent }}
/>

Integration timeline: 1–2 working days with media upload and server sanitization.