Closed SGD-DEV closed 10 months ago
Well, the current editor allows HTML but you should use markdown as much as you can to format your texts.
i know but markdown support no div with classes..
I fully understand your point of view.
Sometimes I really like to use different colors to highlight a specific part in a text. But this is not what markdown is for. It keeps everything simple and clean in a way so we can take the output 1:1 into a plaintext without losing the meaning of the text.
A really good point to deal with this would be by creating a new post type "HTML" where we can use pure HTML along with a WYSIWYG editor like the one you described.
I know what markdown is for. Please understand. Some People need sometimes a litle bit more as only clean text and highlight this text..
So it was pretty if admin can switch the editor.
The htmly sytem is very nice but the markdown is create clean output but is not very cool.
Hi i have it.
Anybody able to integrate with CKEditor or Summernote ?
Fairly simple to replace the markdown editor with CKEditor. Not sure the markdown supporters will even like the thought, but some people need a little more than markdown can offer. In the classroom, CKEditor is all we use, so had to try adding it during my testing of HTMLY.
Our installs are never accessible from the internet and they cannot access the internet, so not worried about security. Maybe the creator can chime in and say if there is security issue.
This is purely a test and you would still need to disable/remove Markdown.Editor.js.
First thing you need to add ckeditor js in files add-content-html.php and edit-content.html.php:
<script src="https://cdn.ckeditor.com/4.16.0/standard/ckeditor.js"></script>
Second thing is disable the the markdown editor in add-content-html.php and edit-content.html.php (temp solution):
<!--<div id="wmd-button-bar" class="wmd-button-bar"></div>-->
Third is add the script to activate for textarea. I placed it right before closing div that contains the texarea. Needs to be in both above files:
<script>
CKEDITOR.replace( 'content', {
allowedContent: true,
});
</script>
That is it. The allowedContent: true will setup so you can use things like YouTube iframe embeds (we do not use - only sharing for online users).
At this point you will have an error in console about Markdown.Editor.js which I assume can be removed. If I recall, this removed the image upload function, so keep that in mind. There may be other issues, but I only wanted to demonstrate that fairly simple to add CKEditor support.
Now the issue is all your changes will be gone on next update of HTMLY:)
open system\admin\views and extract this file
add-content-html.php and edit-content.html.php
This issue is too old, I will close this one. Please create new issue for possible improvements. Thanks
Hello is it possible to change the editor to ckeditor or tinyMCE or bootstrap editor with source code options ?