From aca28de01e7327a45ce025303fc2acc5c3813406 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sat, 9 Jun 2018 19:25:33 +0200 Subject: Use WYMeditor as the article text editor. WYMeditor produces much better XHTML than Trumbowyg. --- static-files/js/article-editing.js | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) (limited to 'static-files/js/article-editing.js') diff --git a/static-files/js/article-editing.js b/static-files/js/article-editing.js index 9922429..1444bba 100644 --- a/static-files/js/article-editing.js +++ b/static-files/js/article-editing.js @@ -1,24 +1,14 @@ -// Copyright 2017, Matthias Andreas Benkard. +// Copyright 2017, 2018, Matthias Andreas Benkard. "use strict"; -jQuery(function($) { - $.trumbowyg.svgPath = '/journal/trumbowyg/icons.svg'; - $('#content-field').trumbowyg({ - btns: [ - ['viewHTML'], - ['formatting'], - 'btnGrp-semantic', - ['superscript', 'subscript'], - ['link'], - ['base64'], - 'btnGrp-lists', - ['horizontalRule'], - ['removeformat'], - ['preformatted'], - ['table', 'tableAddRow', 'tableAddColumn'], - ['fullscreen'] - ], - autogrow: true +document.addEventListener('DOMContentLoaded', function() { + var $ = jQuery; + $(document.getElementById('content-field')).wymeditor({ + skin: "seamless", + iframeBasePath: "/journal/wymeditor/iframe/pretty/", + postInit: function(wym) { + wym.fullscreen(); + } }); }); -- cgit v1.2.3