<?php
$text = stripslashes ($_REQUEST[ 'text' ]);
if ($_POST[ 'text' ])
{
include "remotetypograf.php" ;
$remoteTypograf = new RemoteTypograf( 'UTF-8' );
$remoteTypograf->htmlEntities();
$remoteTypograf->br ( false );
$remoteTypograf->p ( true );
$remoteTypograf->nobr (3);
print $remoteTypograf->processText ($text);
}
?>
* This source code was highlighted with Source Code Highlighter .
js:
$.post( '/sites/all/modules/bueditor/library/typo.php' ,
{ text: editor.active.getContent() }, function(data) { editor.active.setContent(data) });
* This source code was highlighted with Source Code Highlighter .
Source: https://habr.com/ru/post/83294/
All Articles