openrat-cms

OpenRat Content Management System
git clone http://git.code.weiherhei.de/openrat-cms.git
Log | Files | Refs | README

commit d25543af43cf47c30698190a9fcaa00c269f2dd2
parent c6c6babce75781944b184d8f4d1402789f4a119d
Author: Jan Dankert <develop@jandankert.de>
Date:   Fri,  2 Apr 2021 00:12:48 +0200

New: Valueformat "html source"

Diffstat:
Mmodules/cms/model/Element.class.php | 4+++-
Mmodules/cms/ui/themes/default/html/views/pageelement/value.php | 3+++
Mmodules/cms/ui/themes/default/html/views/pageelement/value.tpl.src.xml | 3+++
3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/modules/cms/model/Element.class.php b/modules/cms/model/Element.class.php @@ -36,6 +36,7 @@ class Element extends ModelBase const ELEMENT_FORMAT_HTML = 1; const ELEMENT_FORMAT_WIKI = 2; const ELEMENT_FORMAT_MARKDOWN = 3; + const ELEMENT_FORMAT_HTML_SOURCE = 4; const ELEMENT_FLAG_HTML_ALLOWED = 1; const ELEMENT_FLAG_ALL_LANGUAGES = 2; @@ -466,7 +467,8 @@ SQL self::ELEMENT_FORMAT_TEXT => 'text', self::ELEMENT_FORMAT_WIKI => 'wiki', self::ELEMENT_FORMAT_HTML => 'html', - self::ELEMENT_FORMAT_MARKDOWN => 'markdown' + self::ELEMENT_FORMAT_MARKDOWN => 'markdown', + self::ELEMENT_FORMAT_HTML_SOURCE => 'htmlsource' ); } diff --git a/modules/cms/ui/themes/default/html/views/pageelement/value.php b/modules/cms/ui/themes/default/html/views/pageelement/value.php @@ -54,6 +54,9 @@ <?php $if5=($editor=='html'); if($if5) { ?> <textarea name="<?php echo O::escapeHtml('text') ?>" id="<?php echo O::escapeHtml('pageelement_edit_editor') ?>" class="<?php echo O::escapeHtml('or-input or-editor or-html-editor') ?>"><?php echo ''.@$text.'' ?></textarea> <?php } ?> + <?php $if5=($editor=='htmlsource'); if($if5) { ?> + <textarea name="<?php echo O::escapeHtml('text') ?>" data-extension="<?php echo O::escapeHtml('') ?>" data-mimetype="<?php echo O::escapeHtml('') ?>" data-mode="<?php echo O::escapeHtml('htmlmixed') ?>" class="<?php echo O::escapeHtml('or-input or-editor or-code-editor') ?>"><?php echo O::escapeHtml(''.@$text.'') ?></textarea> + <?php } ?> <?php $if5=($editor=='wiki'); if($if5) { ?> <textarea name="<?php echo O::escapeHtml('text') ?>" class="<?php echo O::escapeHtml('or-input or-editor or-wiki-editor') ?>"><?php echo ''.@$text.'' ?></textarea> <section class="<?php echo O::escapeHtml('or-group or-collapsible or-collapsible--is-closed or-collapsible--show') ?>"><?php echo O::escapeHtml('') ?> diff --git a/modules/cms/ui/themes/default/html/views/pageelement/value.tpl.src.xml b/modules/cms/ui/themes/default/html/views/pageelement/value.tpl.src.xml @@ -26,6 +26,9 @@ <if value="${editor}" equals="html"> <editor type="html" name="text"/> </if> + <if value="${editor}" equals="htmlsource"> + <editor type="code" name="text" mode="htmlmixed"/> + </if> <if value="${editor}" equals="wiki"> <editor type="wiki" name="text"/> <group title="${message:help}" open="false">