Added Richtext compatibility layer

This commit is contained in:
Lucas Bartholemy 2018-04-23 15:21:53 +02:00
parent 6b4b1e7e43
commit 95ec30c8c3
4 changed files with 38 additions and 2 deletions

View File

@ -262,9 +262,8 @@ class Controller extends \yii\web\Controller
if (Yii::$app->request->isPjax) {
Yii::$app->response->statusCode = $statusCode;
Yii::$app->response->headers->add('X-PJAX-REDIRECT-URL', Url::to($url));
return;
return Yii::$app->getResponse();
}
return Yii::$app->getResponse()->redirect(Url::to($url), $statusCode);
}

View File

@ -11,6 +11,7 @@ namespace humhub\modules\content\widgets\richtext;
use humhub\libs\ParameterEvent;
use humhub\models\UrlOembed;
use humhub\modules\content\assets\LegacyRichTextAsset;
use humhub\modules\space\models\Space;
use humhub\modules\user\models\Mentioning;
use humhub\modules\user\models\User;
@ -32,6 +33,8 @@ class HumHubRichText extends AbstractRichText
*/
public function run()
{
LegacyRichTextAsset::register($this->view);
if ($this->encode) {
$this->text = Html::encode($this->text);
}

View File

@ -0,0 +1,17 @@
<?php
namespace humhub\widgets;
use humhub\modules\content\widgets\richtext\HumHubRichText;
/**
* RichText
*
* @deprecated since 1.3 this is the legacy rich text implementation which won't be maintained in the future.
* @package humhub\widgets
*/
class RichText extends HumHubRichText
{
}

View File

@ -0,0 +1,17 @@
<?php
namespace humhub\widgets;
use humhub\modules\content\widgets\richtext\HumHubRichTextEditor;
/**
* RichtextField
*
* @deprecated since 1.3 this is the legacy rich text editor implementation which won't be maintained in the future.
* @package humhub\widgets
*/
class RichtextField extends HumHubRichTextEditor
{
}