mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-17 06:18:44 +02:00
N°2847 Add RichText input
This commit is contained in:
4
css/backoffice/components/_richtext.scss
Normal file
4
css/backoffice/components/_richtext.scss
Normal file
@@ -0,0 +1,4 @@
|
||||
/*!
|
||||
* copyright Copyright (C) 2010-2020 Combodo SARL
|
||||
* license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
19
sources/application/UI/Component/Input/RichText/RichText.php
Normal file
19
sources/application/UI/Component/Input/RichText/RichText.php
Normal 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';
|
||||
}
|
||||
4
templates/components/input/richtext/layout.html.twig
Normal file
4
templates/components/input/richtext/layout.html.twig
Normal 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 %}
|
||||
1
templates/components/input/richtext/layout.js.twig
Normal file
1
templates/components/input/richtext/layout.js.twig
Normal file
@@ -0,0 +1 @@
|
||||
$('#{{ oUIBlock.GetId() }}').ckeditor(function() { /* callback code */ }, {'language': 'en', 'contentsLanguage' : 'en', 'extraPlugins' : 'disabler,codesnippet'});
|
||||
Reference in New Issue
Block a user