Add html format support for CKeditor #83
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Storing the output of the CKEditor in Markdown format was causing lot of troubles. The major one is that
ckeditor
and otherWYSIWYG
editors, when creating an output in markdown format they also write some html tags for the style. Example, for images:This causes a particular problem which is: rendering to html markdown text inside already existing html tags. CKAN renders all the MD correctly but the link inside the figure html element is not rendered into an actual image tag. We can remove the already existing html tags in ckeditor’s output but that forces us to loose the style we give to it in the editor.
This problem of rendering markdown inside html tags is well documented and I have tried several approaches and none was successful so we opted to store data in plain HTML if ckeditor is loaded.
This PR:
ckeditor
is enabled to use custom ckeditor css described here. (CKEditor uses some special classes that we need to integrate in our UI to actually get what we see)webpack.config.js
to create the minified css while runningnpx webpack --config webpack.config.js
markdown_to_html
to migrate notes from existing showcases to an HTML formatSome images
Todo: