Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QUESTION Modify or Replace CKEditor
#1
Dear GS Users and Developers:

I do like GetSimple CMS very much - in fact GetSimple is gradually going to become my favorite CMS.

But there is a rub - the same as in most CMSs: The WYSIWYG editor (in most cases CKEditor) is usually coded to provide absolute font and image sizes (as well as line-heights, margins and so on).

So the first thing I do when I start using a new CMS with built-in CKEditor is to hack CKEditor to use "em" instead of "px" to make it easier to produce responsive content.

But this is messy and not the easiest way to go, as there are usually only certain versions of CKEditor which can be used with certain extensions (most important one: lineheight)  and a certain version of the CMS at hand. And this certain version of CKEditor is almost always a version which can't be simply downloaded from the official website. Yes, usually I find a working combination of versions but this is time consuming.

That's why I would like to ask you:

1) Is there built-in API for CKEditor in GetSimple CMS which allows me to easily modify the behavior of CKEditor, for example to show and output em instead of px?

2) What do I have to do to substitute CKEditor with a WYSIWYG editor that is easier to modify like Quill?

3) Do you know of a free offline WYSIWYG HTML editor running on Windows which is programmable in the sense that I can alter the way it outputs HTML?

4) Do you know of a free XML editor running on Windows?

If I succeed in replacing CKEditor -  or modifying it in a non-messy way - I would gladly show you my solution so maybe other users of GetSimple CMS might profit as well.

Best regards
Samson
Reply
#2
This is covered somewhere in forums and github, I even made an experimental plugin , it is much easier in 3.4 but can possibly be done in 3.3.x also. You might have to search for it, I have no idea where its at.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#3
Also you should not have to hack cke, you can inject config settings in gsconfig and add plugins and stuff in config.js
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#4
Dear shawn_a:

thank you very much for your two answers (2019-10-02, 00:25:38 and 2019-10-02, 00:26:38).

I will search for your experimental plugin and try out how it works and which tweaks are possible with it.

As for using gsconfig:
Yes, I have used that too, but only with a combination of additional entries in config.js, style.js, content.css , gsconfig.php, and hacking ckeditor.js I could implement all the features which allowed my customers to get responsive texts and images and the ability to control the line-height.
I did that with GS 3.3.12 and it is still working.
I also did that in a version of Drupal 7 and it also works, but getting all this set up is very time consuming and error prone.

I always wonder why there is no offline WYSIWYG editor which allows me to programmatically change its output to relative units and classes instead of absolute sizes. Then there would be no reason to go through all these steps.

If I find one - unfortunately, this seems unlikely, as I have been searching quite a while - I will let you know.

So, again, thank you very much for your answer and your the superb CMS.

Oh, yes there's a related question:

You wrote: "it is much easier in 3.4".
And, on the 3.4.0.9 download page, you wrote:
"Warning
Not all plugins are compatible with this, anything that includes codemirror or ckeditor may have issues or conflicts with the versions included in core now"

So I'm a little confused or have I misunderstood something?

Best regards
Samson
Reply
#5
Smile 
Quote:4) Do you know of a free XML editor running on Windows?

Notepad++

Not only for xml but for the whole shebang
Reply
#6
(2019-10-02, 05:06:04)Felix Wrote:
Quote:4) Do you know of a free XML editor running on Windows?

Notepad++

Not only for xml but for the whole shebang

Dear Felix:

Thank you very much for recommending Notepad++.

Strangely, I've never used it to edit XML files.

Best regards
Samson
Reply
#7
Dear shawn_a:

As to your answer on 2019-10-02, 00:25:38 regarding github:

I can't post my list of commits I checked on github, as the server throws an error.
But the gist is, that I didn't find anything relevant

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.
More information about this error may be available in the server error log.


Web Server at get-simple.info

Best regards
Samson
Reply
#8
(2019-10-02, 09:11:07)Samson Wrote: Dear shawn_a:

As to your answer on 2019-10-02, 00:25:38 regarding github:

I can't post my list of commits I checked on github, as the server throws an error.
But the gist is, that I didn't find anything relevant

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.
More information about this error may be available in the server error log.


Web Server at get-simple.info

Best regards
Samson

This post works, maybe the list is too long ...
Reply
#9
(2019-10-02, 09:14:17)Samson Wrote:
(2019-10-02, 09:11:07)Samson Wrote: Dear shawn_a:

As to your answer on 2019-10-02, 00:25:38 regarding github:

I can't post my list of commits I checked on github, as the server throws an error.
But the gist is, that I didn't find anything relevant

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.
More information about this error may be available in the server error log.


Web Server at get-simple.info

Best regards
Samson

This post works, maybe the list is too long ...

It seems your server doesn't like the github links:

github.com/GetSimpleCMS/GetSimpleCMS/commit/7e1a4a22ae3f97a7bd234fc8d73c94c69d5afb12
Reply
#10
(2019-10-02, 09:15:25)Samson Wrote:
(2019-10-02, 09:14:17)Samson Wrote:
(2019-10-02, 09:11:07)Samson Wrote: Dear shawn_a:

As to your answer on 2019-10-02, 00:25:38 regarding github:

I can't post my list of commits I checked on github, as the server throws an error.
But the gist is, that I didn't find anything relevant

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.
More information about this error may be available in the server error log.


Web Server at get-simple.info

Best regards
Samson

This post works, maybe the list is too long ...

It seems your server doesn't like the github links:

github.com/GetSimpleCMS/GetSimpleCMS/commit/7e1a4a22ae3f97a7bd234fc8d73c94c69d5afb12

No, one link works.

Commits on Mar 24, 2018

remove uneeded cke assets
github.com/GetSimpleCMS/GetSimpleCMS/commit/7e1a4a22ae3f97a7bd234fc8d73c94c69d5afb12


cke 4.9
github.com/GetSimpleCMS/GetSimpleCMS/commit/38712c5a07c154d4f58fe7b5dcc6abd69e94520c
Reply
#11
(2019-10-02, 09:16:59)Samson Wrote:
(2019-10-02, 09:15:25)Samson Wrote:
(2019-10-02, 09:14:17)Samson Wrote:
(2019-10-02, 09:11:07)Samson Wrote: Dear shawn_a:

As to your answer on 2019-10-02, 00:25:38 regarding github:

I can't post my list of commits I checked on github, as the server throws an error.
But the gist is, that I didn't find anything relevant

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.
More information about this error may be available in the server error log.


Web Server at get-simple.info

Best regards
Samson

This post works, maybe the list is too long ...

It seems your server doesn't like the github links:

github.com/GetSimpleCMS/GetSimpleCMS/commit/7e1a4a22ae3f97a7bd234fc8d73c94c69d5afb12

No, one link works.

Commits on Mar 24, 2018

remove uneeded cke assets
github.com/GetSimpleCMS/GetSimpleCMS/commit/7e1a4a22ae3f97a7bd234fc8d73c94c69d5afb12


cke 4.9
github.com/GetSimpleCMS/GetSimpleCMS/commit/38712c5a07c154d4f58fe7b5dcc6abd69e94520c

OK, two links work, but this seems to be the limit.
Reply
#12
Dear shawn_a:

As to your answer on 2019-10-02, 00:25:38 regarding this forum:

I searched this GetSimple Community Forum and also found no plugin to modify the HTML output of CKEditor. The only issue which came up was changing absolute paths into relative ones.

Have I missed something?


Best regards
Samson
Reply
#13
(2019-10-02, 09:23:17)Samson Wrote: I searched this GetSimple Community Forum and also found no plugin to modify the HTML output of CKEditor. The only issue which came up was changing absolute paths into relative ones.

Have I missed something?

Maybe some of this info you already know:

CKeditor has it's own plugins. I think you need to know what version of CKeditor is used in GS and then use a plugin compattible with that. I think it's using CKeditor 4, so then you have to download the plugin here: https://ckeditor.com/cke4/addons/plugins/all

There are also GSconfig settings. You can find some info in the docs section of this site.
Reply
#14
(2019-10-03, 19:09:41)datiswous Wrote:
(2019-10-02, 09:23:17)Samson Wrote: I searched this GetSimple Community Forum and also found no plugin to modify the HTML output of CKEditor. The only issue which came up was changing absolute paths into relative ones.

Have I missed something?

Maybe some of this info you already know:

CKeditor has it's own plugins. I think you need to know what version of CKeditor is used in GS and then use a plugin compattible with that. I think it's using CKeditor 4, so then you have to download the plugin here: https://ckeditor.com/cke4/addons/plugins/all

There are also GSconfig settings. You can find some info in the docs section of this site.

Dear datiswous:

Thank you very much for your answer on 2019-10-03, 19:09:41.

Yes, I know about the plugins which an be downloaded for CKEditor.

But it seemed easier to assemble a custom-built version of CKEditor on their website and use this with GetSimple CMS.

Right now I try to set up local versions of different WYSIWYG HTML editors and then I try to modify their HTML outputs. If this succeeds, I simply deactivate CKEditor in GetSimple CMS. Not the optimal solution, but a pragmatical one.

Best regards
Samson
Reply
#15
http://get-simple.info/forums/showthread.php?tid=7031
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#16
The above for 3.3.x is a kludge

How the editors were modularized
https://github.com/GetSimpleCMS/GetSimpleCMS/issues/546
https://github.com/GetSimpleCMS/GetSimpleCMS/issues/882
I do not have any instructions on replacing it in 3.4, but I am pretty sure I have code or test plugin somewhere... It might even be in a component somewhere....

I will try to take a look and remember and make an example with your preferred editor, front end editors that manipulate a text area are easy, adding support to backend becomes harder.

But theoretically the editor should be able to be swapped via a plugin now.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#17
Dear shawn_a:

thank you very much for your two answers (2019-10-05, 04:47:51 and 2019-10-05, 05:03:14).

You are a very helpful.

At the moment of writing these lines, I achieved more success in modifying Suneditor than in modifying Quill, so it would be great if in the version 3.4 of GetSimple WYSIWYG editors can be swapped. This reminds me of Drupal in its heydays. Coincidentally, the friendly answers I receive in this forum also remind me of said time.

So thank you again for your help. The moment I have modified one the WYSIWYG HTML editors I'm currently investigating, I will post the results here.

The other option I'm pursuing is to find a free WYSIWYG HTML editor running on Windows which sports a programmable HTML output, but I'm afraid there is none. The funny thing about it is that I have the notion that such an editor most customers of CMSs would embrace with joy. but then there seems to be none. So is there another way besides writing HTML? Have I missed something important?

Best regards
Samson
Reply
#18
I have seen a few most of them use webdav
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#19
Quote: so it would be great if in the version 3.4 of GetSimple WYSIWYG editors can be swapped.

Keep in mind that with this you could lose the wysiwyg custom field (mvlcek plugin)
imho a must have
Reply




Users browsing this thread: 1 Guest(s)