sstur / draft-js-utils

DraftJS: import/export ContentState to and from HTML/Markdown

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom wrapper elements

LukasBlu1 opened this issue · comments

Hi all!

Thank you for your efforts to provide this package :)
I want to use custom wrapper elements for headings. How can I achieve this? I have tried to get it wokring but without success.

Thanks in advance :)

For example:

<p> // <--- H1 Tag or a class like heading-1
   <span style="font-size: 3.5em">Donec 1</span>
   <span style="font-size: 3.5em"><u style="text-decoration: underline">sollicitudin</u></span>
   <span style="font-size: 3.5em"> molestie maledssuada.</span>
</p>
<p> // <--- H2 Tag or a class like heading-2
   <span style="font-size: 2.5em">Donec sollicitudin molestie maledsuada.&nbsp;</span>
</p>
<p> // <--- H3 Tag or a class like heading-3
   <span style="font-size: 1.5em">Donec sollicitudin molestie maledsuada.&nbsp;</span>
</p>
<p>
   Nulla porttitor accumsan <strong style="font-weight: bold">tincidunt</strong>. Vestibulum ac diam sit amet quam
   vehicula <em style="font-style: italic">elementum</em> esed sit amet dui.
   <u style="text-decoration: underline">Praesent sa</u>pien massa, <span style="color: #7f2222">convallis</span> a
   pellentesqudde nec, egestas non nisi. Donec rutrum congue leo eget madlesuada.
</p>