Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions about CKEditor config and plugins #42

Closed
ccc2lu opened this issue Jun 16, 2016 · 1 comment
Closed

Questions about CKEditor config and plugins #42

ccc2lu opened this issue Jun 16, 2016 · 1 comment
Assignees
Labels

Comments

@ccc2lu
Copy link
Contributor

ccc2lu commented Jun 16, 2016

A user at Lehigh University wants to me to customize some aspects of the WYSIWYG editor in the Scalar 2 interface.

First, he wants to know if it can be configured to auto-save changes while he's working on a page. I found this CKEditor plugin:
http://ckeditor.com/addon/autosave
If I were to install this plugin in ${scalar_dir}/system/application/views/widgets/ckeditor/plugins and configure it in ${scalar_dir}/system/application/views/widgets/ckeditor/config.js, would that likely work? Is this a bad idea?

This same user is also asking about font styles and sizes. The way CKEditor is configured in the Scalar 2 interface, it looks like the user doesn't get to choose the font, and the size is only configured using the "H1" dropdown. I could install another plugin like this one to give the user more font related options:
http://ckeditor.com/addon/font
Same question -- is this likely to work? Is it a bad idea?

@craigdietrich craigdietrich self-assigned this Jul 5, 2016
@craigdietrich
Copy link
Collaborator

Hi @ccc2lu

Very sorry about the late reply!

Looking at the auto-save plugin, the documentation says that it saves snapshots every 25 seconds to HTML5 localStorage, so I don't think this will conflict with the edit page's saving, which uses the Scalar API to save page content (incrementing the current version of the page) ... I think the idea is that if something goes wrong on the page (it crashes or is closed), CKEditor can retrieve the content from HTML5 localStorage via its own means, which, since that content is now in the WYSIWYG, can then be saved via the normal edit page save action. So, I'd vote for going for it, this sounds exciting!

We tend to resist suggestions to add font choices, since the Scalar front-end tends to be very specific in the ways it embeds media and links and such around HTML, and other built-in style, that would get disrupted pretty easily by changes in the font. (It's a big part of the reason we suggest cutting-and-pasting into the 'Source' view of CKEditor, to strip away formatting that might come along from MS-Word other other places when pasting.) But, if the font choices don't get too out of hand ....

Definitely keep us apprised! Will you be working in a fork of Scalar?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants