N°2847 Add RichText input

This commit is contained in:
Stephen Abello
2020-09-30 09:40:09 +02:00
parent 12bf77d9ca
commit fd3f972948
4 changed files with 28 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
/*!
* copyright Copyright (C) 2010-2020 Combodo SARL
* license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -0,0 +1,19 @@
<?php
/**
* @copyright Copyright (C) 2010-2020 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
namespace Combodo\iTop\Application\UI\Component\Input\RichText;
use Combodo\iTop\Application\UI\UIBlock;
/**
* Class RichText
*
* @package Combodo\iTop\Application\UI\Component\RichText
*/
class RichText extends UIBlock
{
// Overloaded constants
public const BLOCK_CODE = 'ibo-richtext';
public const HTML_TEMPLATE_REL_PATH = 'components/input/richtext/layout';
public const JS_TEMPLATE_REL_PATH = 'components/input/richtext/layout';
}

View File

@@ -0,0 +1,4 @@
{% extends "components/input/layout.html.twig" %}
{% block iboInput %}
<textarea id="{{ oUIBlock.GetId() }}" class="htmlEditor" title="$sHelpText" name="{{ oUIBlock.GetName() }}" ></textarea>
{% endblock %}

View File

@@ -0,0 +1 @@
$('#{{ oUIBlock.GetId() }}').ckeditor(function() { /* callback code */ }, {'language': 'en', 'contentsLanguage' : 'en', 'extraPlugins' : 'disabler,codesnippet'});