This PR introduces a TinyMCE plugin that allows to separate WYSIWYG concerns from format transformation.
The core idea is to establish a well-defined format for interfacing with the WYSIWYG editor component. Let's call it visual editor HTML.
redmineformat plugin inside of TinyMCE is responsible for adapting visual editor HTML to/from WYSIWYG DOM.
redmine_wysiwyg_editor (outside of TinyMCE) is responsible for conversions between markup language (Textile or Markdown with Redmine extensions like macros) and visual editor HTML. Most of the operations are indeed delegated to a) libraries like Turndown and b) Redmine itself using AJAX preview call .
redmineformat plugin currently addresses code block syntax, which resolves #41. But it also provides a way to resolve other issues like this fixme.
If the concept is adopted, we'll provide some basic contract documentation for the visual editor HTML within subsequent PRs (support for macros seems to be the best opportunity :)).
Additional info:
Quality assurance: Added unit tests with headless TinyMCE on top of pure JSDOM.
This PR introduces a TinyMCE plugin that allows to separate WYSIWYG concerns from format transformation.
The core idea is to establish a well-defined format for interfacing with the WYSIWYG editor component. Let's call it visual editor HTML.
redmineformat
plugin inside of TinyMCE is responsible for adapting visual editor HTML to/from WYSIWYG DOM.redmine_wysiwyg_editor
(outside of TinyMCE) is responsible for conversions between markup language (Textile or Markdown with Redmine extensions like macros) and visual editor HTML. Most of the operations are indeed delegated to a) libraries like Turndown and b) Redmine itself using AJAX preview call .redmineformat
plugin currently addresses code block syntax, which resolves #41. But it also provides a way to resolve other issues like this fixme.If the concept is adopted, we'll provide some basic contract documentation for the visual editor HTML within subsequent PRs (support for macros seems to be the best opportunity :)).
Additional info: