changeset 378de0f36b8e in trytond:default
details: https://hg.tryton.org/trytond?cmd=changeset;node=378de0f36b8e
description:
Support Genshi element directives in HTML editor
issue9510
review331591002
diffstat:
CHANGELOG | 1 +
trytond/ir/routes.py | 18 +++++++++++++++++-
2 files changed, 18 insertions(+), 1 deletions(-)
diffs (40 lines):
diff -r 1ae80af4fbe4 -r 378de0f36b8e CHANGELOG
--- a/CHANGELOG Sun Jan 10 23:41:24 2021 +0100
+++ b/CHANGELOG Mon Jan 11 00:04:35 2021 +0100
@@ -1,3 +1,4 @@
+* Support Genshi element directives in HTML editor
* Add firstline tool
* Add support for Python 3.9
* Skip access check on ModelStorage instances
diff -r 1ae80af4fbe4 -r 378de0f36b8e trytond/ir/routes.py
--- a/trytond/ir/routes.py Sun Jan 10 23:41:24 2021 +0100
+++ b/trytond/ir/routes.py Mon Jan 11 00:04:35 2021 +0100
@@ -112,11 +112,27 @@
tinymce.init({
selector: '#text',
language: '%(language)s',
- plugins: 'fullscreen autosave %(plugins)s',
+ plugins: 'fullscreen autosave code %(plugins)s',
removed_menuitems: 'newdocument',
toolbar: 'save | undo redo | styleselect | bold italic | ' +
'alignleft aligncenter alignright alignjustify | ' +
'bullist numlist outdent indent | link image | close',
+ extended_valid_elements:
+ 'py:if[test],' +
+ 'py:choose[test],py:when[test],py:otherwise,' +
+ 'py:for[each],' +
+ 'py:def[function],' +
+ 'py:match[path],' +
+ 'py:with[vars],' +
+ 'py:replace[value]',
+ custom_elements:
+ 'py:if,' +
+ 'py:choose,py:when,py:otherwise,' +
+ 'py:for,' +
+ 'py:def,' +
+ 'py:match,' +
+ 'py:with,' +
+ 'py:replace',
content_css: %(css)s,
body_class: %(class)s,
setup: function(editor) {