From 41a4e3559289235ea7a89d0325afc014faeb49be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emanuel=20Sch=C3=BCtze?= Date: Tue, 1 Nov 2016 17:35:09 +0100 Subject: [PATCH] Use tinymce editor for motion comment fields. --- openslides/motions/static/js/motions/base.js | 8 ++++++-- .../static/templates/motions/motion-detail.html | 13 +++++++------ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/openslides/motions/static/js/motions/base.js b/openslides/motions/static/js/motions/base.js index 3e2cdbe2f..3246e0256 100644 --- a/openslides/motions/static/js/motions/base.js +++ b/openslides/motions/static/js/motions/base.js @@ -444,7 +444,8 @@ angular.module('OpenSlidesApp.motions', [ .factory('MotionComment', [ 'Config', 'operator', - function (Config, operator) { + 'Editor', + function (Config, operator, Editor) { return { getFormFields: function () { var fields = Config.get('motions_comments').value; @@ -453,10 +454,13 @@ angular.module('OpenSlidesApp.motions', [ function (field) { return { key: 'comment ' + field.name, - type: 'input', + type: 'editor', templateOptions: { label: field.name, }, + data: { + tinymceOption: Editor.getOptions() + }, hide: !operator.hasPerms("motions.can_see_and_manage_comments") }; } diff --git a/openslides/motions/static/templates/motions/motion-detail.html b/openslides/motions/static/templates/motions/motion-detail.html index 7064a0a8f..4ba4a5264 100644 --- a/openslides/motions/static/templates/motions/motion-detail.html +++ b/openslides/motions/static/templates/motions/motion-detail.html @@ -407,11 +407,12 @@

Motion Comments

-

- {{ field.name }}: - internal -
- {{ motion.comments[$index] }} -

+
+

+ {{ field.name }} + internal +

+
+