This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$config = \HTMLPurifier_Config::createDefault(); | |
$config->set('HTML.DefinitionID', 'basecamp-trix-editor'); | |
$config->set('HTML.DefinitionRev', 1); | |
$config->set('HTML.TidyLevel', 'none'); | |
if ($def = $config->maybeGetRawHTMLDefinition()) { | |
$def->addElement('figure', 'Inline', 'Inline', 'Common'); | |
$def->addAttribute('figure', 'class', 'Text'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div> | |
<span data-trix-cursor-target="left" data-trix-serialize="false"></span> | |
<a href="/storage/images/csj7OIvDjJoyY6ifud9DdhhCcn3FkODBWnqIq6kF.png" tabindex="-1" data-trix-attachment="{"contentType":"image/png","filename":"image_01.png","filesize":380974,"height":479,"href":"/storage/images/csj7OIvDjJoyY6ifud9DdhhCcn3FkODBWnqIq6kF.png","url":"/storage/images/csj7OIvDjJoyY6ifud9DdhhCcn3FkODBWnqIq6kF.png","width":468}" data-trix-content-type="image/png" data-trix-id="253" contenteditable="false"> | |
</a><figure class="attachment attachment--preview attachment--png"><a href="/storage/images/csj7OIvDjJoyY6ifud9DdhhCcn3FkODBWnqIq6kF.png" tabindex="-1" data-trix-attachment="{"contentType":"image/png","filename":"image_01.png","filesize":380974,"height":479,"href":"/storage/images/csj7OIvDjJoyY6ifud9DdhhCcn3FkODBWnqIq6kF.png","url":"/storage/images/csj7OIvDjJoyY6ifud9DdhhCcn3FkODBWnqIq6kF.png","width":468}" data-trix-content-type="image/png" data-trix-id="253" contenteditable="false"> | |
<img src="/storage/image |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function htmlPurifier() | |
{ | |
$config = \HTMLPurifier_Config::createDefault(); | |
$config->set('HTML.DefinitionID', 'basecamp-trix-editor'); | |
$config->set('HTML.DefinitionRev', 1); | |
if ($def = $config->maybeGetRawHTMLDefinition()) { | |
$def->addElement('figure', 'Block', 'Flow', 'Common'); | |
$def->addAttribute('figure', 'class', 'Text'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div><span></span> | |
<a href="/storage/original/csj7OIvDjJoyY6ifud9DdhhCcn3FkODBWnqIq6kF.png" data-trix-attachment="{"contentType":"image/png","filename":"image_01.png","filesize":294205,"height":318,"href":"/storage/original/csj7OIvDjJoyY6ifud9DdhhCcn3FkODBWnqIq6kF.png","url":"/storage/original/csj7OIvDjJoyY6ifud9DdhhCcn3FkODBWnqIq6kF.png","width":500}" data-trix-content-type="image/png"> | |
</a> | |
<figure class="attachment attachment--preview attachment--png"> | |
<a href="/storage/original/csj7OIvDjJoyY6ifud9DdhhCcn3FkODBWnqIq6kF.png" data-trix-attachment="{"contentType":"image/png","filename":"image_01.png","filesize":294205,"height":318,"href":"/storage/original/csj7OIvDjJoyY6ifud9DdhhCcn3FkODBWnqIq6kF.png","url":"/storage/original/csj7OIvDjJoyY6ifud9DdhhCcn3FkODBWnqIq6kF.png","width":500}" d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div><!--block--> | |
<span data-trix-cursor-target="left" data-trix-serialize="false"></span> | |
<a href="/storage/images/csj7OIvDjJoyY6ifud9DdhhCcn3FkODBWnqIq6kF.png" tabindex="-1" data-trix-attachment="{"contentType":"image/png","filename":"image_01.png","filesize":380974,"height":479,"href":"/storage/images/csj7OIvDjJoyY6ifud9DdhhCcn3FkODBWnqIq6kF.png","url":"/storage/images/csj7OIvDjJoyY6ifud9DdhhCcn3FkODBWnqIq6kF.png","width":468}" data-trix-content-type="image/png" data-trix-id="253" contenteditable="false"> | |
<figure class="attachment attachment--preview attachment--png"> | |
<img src="/storage/images/csj7OIvDjJoyY6ifud9DdhhCcn3FkODBWnqIq6kF.png" data-trix-mutable="true" width="468" height="479" data-trix-store-key="imageElement/253/https://sef.dev/storage/images/csj7OIvDjJoyY6ifud9DdhhCcn3FkODBWnqIq6kF.png/409/418"> | |
<figcaption class="attachment__caption" data-trix-placeholder="Add a caption…"> |