Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Add support for CKEditor v4 with new option in admin panel to enable/disable "DIV-based" editor, instead of old iframe editor (DIV-based editor is enabled now by default - if CKEditor v4 is detected).
Also we rewrite functions responsible for generating relative and local paths for CKEditor, CKFinder and Plugins dir.
Greetings
Comment | File | Size | Author |
---|---|---|---|
#15 | no Moono.png | 34.64 KB | Ditiwi |
Comments
Comment #1
dczepierga CreditAttribution: dczepierga commentedI commit all changes to GIT (diff).
It could be more changes to work with CKEditor v4, because is not released yet.
If u find any bugs pls write it here.
Greetings
Comment #2
dczepierga CreditAttribution: dczepierga commentedFor all who wants to review CKEditor module with new CKEditor v4 - u can download nightly build of CKE v4 library from here: http://nightly.ckeditor.com/
I will be grateful for any help.
Greetings
Comment #3
jcisio CreditAttribution: jcisio commentedFinally! Thank you! But will 6.x-1.x support v4? I think if it supports, many D6 sites won't hesistate to upgrade to v4, as the upgrade will be quite easy.
Also I quickly scan the patch. I don't quite understand about different types of path: local, relative, url... It makes me disturbed. Why don't just use the classic Drupal functions everywhere (and try to use relative path when possible):
- drupal_get_path('module', 'ckeditor') to get the path of the module
- base_path() to prefix url
- If path to the CKFinder is $path (= 'sites/all/libraries/ckfinder') then url to it is base_path() . '/' . $path.
Maybe you want to keep the same code across different CMS, but I think in this case the benefit is minimized.
Comment #4
dczepierga CreditAttribution: dczepierga commentedYes, CKEditor v4 will be supported in D6 also.
All the time CKEditor module have problems with paths on diffrent configurations and webservers - when u want to fix it u must search all places where it is and then everywhere change it, so i make one function where i generate it and call it only with specific param. Now i can fix sth with paths in one place, so it's faster and much easier to fix.
I've add 3 types of paths:
- local - for checking files using local path (reading files, checking if file/dir exists etc)
- relative - for loading some files and configure some options from CKEditor (path is with base path in the beggining)
- url - path for files where we need to add files like drupal_add_js - i cannot use here relative path, because then Drupal generate a lot of errors when u enable cache/aggregation... without cache/aggregation everything works fine with relative path, i don't know does it Drupal bug or sth else...
Also u must remember does it possible to configure local path of CKEditor, so here u must generate this path in diffrent way than in relative path of CKEditor.
Greetings
Comment #5
astutonet@dczepierga, I upgraded the CKEditor to version 7.x-1.9 +21- dev, released in 2012-Nov-22.
The new version does not work in the area of text editing, where we used Full HTML and PHP Code. The text editor is not displayed when creating new pages or edit.
In the comments area, where they are used Filtered HTML and plain text, the editor is displayed correctly.
If I use the full URL path to the features of editor, it does not work for new content, editing of existing ones and not in the comments.
There is no error message displayed.
This is a multilingual site and I think the problem is related to this issue.
Any help will be appreciated.
Tks
Edit: For creating or editing content, the editor works normally if I select the format Filtered HTML or plain text.
Edit 2: During the installation of CKEditor on a new local site, I notice the following error message:
Comment #6
dczepierga CreditAttribution: dczepierga commented@astutonet, really thx for your review. I fix bug from "Edit 2" here: #1844390: [D7] Undefined index: loadPlugins in ckeditor_modules_enabled()
It is possible to get any access to your site and see what happend? Or u can write here step by step what to do to configure all like u have and reproduce this bug?
Greetings
Comment #7
dczepierga CreditAttribution: dczepierga commentedComment #8
astutonetHmmmm ... The new version of the module was installed only in the backup, offline.
I must consider that I'm still using version 3.6.5 of CKEditor core.
We must also consider that if CKEditor is running ok for plain text format and for advanced text formatting there are problems, there is probably a conflict with the resources used to advanced mode.
Disable and re-enable the module does not solve the issue. I also tested the database and changed the default theme for Bartik. Nothing.
Text Format - Full HTML:
I can anticipate that I enabled and have disabled individually all options used in the roles and the editor was not displayed in any of the situations.
Filters installed: Pathologic and WYSIWYG (Base Path & Domains List are identical).
In WYSIWYG, the Rules for URLs used within inline styles only contains "/*".
Installing CKEditor:
The module is installed in CKEditor: sites/all/modules/ckeditor.
The core CKEditor is in: sites/all/modules/ckeditor/ckeditor.
Global Profile - CKEditor:
Path to CKEditor: %m/ckeditor/ckeditor
Local path to CKEditor: Empty
Path to the CKEditor plugins directory: %m/ckeditor/plugins
Path to the directory location of the CKEditor plugins: empty
NOTE: If I downgrade to old a version, the problems dissapear.
Any ideas?
Comment #9
mkesicki CreditAttribution: mkesicki commentedNew CKEditor 4 was released yesterday . More info about it: http://ckeditor.com/blog/CKEditor-4-Launched-Inline-Editing-New-Skin-and-More
Comment #10
astutonetOk.
Using CKE nightly build v4, with new release of our CKE DEV Module, released today, so far no problems. Let's to test.
Tks
Comment #11
lmeurs CreditAttribution: lmeurs commentedSo far, so good!
I had to change the path to the editor at
admin/config/content/ckeditor/editg
(I use a version of the editor outside the modules folder). Now when I tested the editor without success, this happened to be caused by skin files that could not be loaded. This was since the new editor comes with skin Moono, and I had 'the old' Kama skin selected atadmin/config/content/ckeditor/edit/Full
(full HTML profile). I opened this settings page, Moona was automatically selected and saved this page. Now I could use the editor.I did some tests with CKFinder (copied this folder from the stable module to the development version) and CKEditor Link, and it all seemed to work.
The only big difference is that we bought a Corporate License, but in the modules downloaded from Drupal.org the form fields for entering license data are gone. Because of this CKFinder offers less options since it is in demo mode. I copied / pasted them from the our original module and fiddled some with filemanager.config.php, but without success. Is there a solution to this?
Comment #12
mkesicki CreditAttribution: mkesicki commented@lmeurs,
commercial version of CKEditor module for Drupal from http://cksource.com/ckeditor-for-drupal has build in support and configuration for CKFinder and has it's own license type. There is no way to use license from commercial version in open source module. In this moment we are working hard to add support of CKEditor 4 to CKEditor module (both OS & Commercial versions). You should use dedicated support channel to get help with commercial version of CKEditor for Drupal module.
Comment #13
lmeurs CreditAttribution: lmeurs commented@michal_cksource: Thank you for the response and clarification. I already contacted Jakub Swiderski about it, he told me the release should be ready within a month. I tried the opensource module since I am so anxious to finally offer our clients an editor that works well with Chrome. We have contacted your support desk about the bugs months ago and posted bug reports, we have been told to wait for v4 which would no longer contain the Chrome bugs (ie. inserting paragraphs containing paragraphs on paste, inserting wrapping div elements on shift+paste). I understand that you guys are pretty busy and do love your work (congratulations on the new editor and site!), but cannot wait to install a correctly working editor for our clients! (sorry for the off topic comment)
Comment #14
mkesicki CreditAttribution: mkesicki commented@lmeurs,
glad that everything is clear now. We are pretty busy now , so please be patient :)
Comment #15
Ditiwi CreditAttribution: Ditiwi commentedWith Drupal 7.17 and CKEditor 7.x-1.x-dev module and CKEditor 4 in /libraries work fine... but the new skin Moono is not loaded (html but no CSS). Although Moono is selected in the profiles. I set
in config.js and the text editor is correctly displayed.
Comment #16
quicksketchI've been working with CKEditor 4.x as a candidate for Drupal 8 core, which I've got demonstrated at: http://quicksketch.org/wysiwyg. I'd love to backport these changes into Drupal 7 too to get more eyeballs on the project. However this module takes a fairly different tack than the existing CKEditor module. Rather than showering the user with options it only exposes the most relevant configuration. Some options could certainly be extended.
In any case that version of the module has been written specifically for the 4.x version of CKEditor. The code for the project is in my WYSIWYG in core sandbox: http://drupal.org/sandbox/quicksketch/1088256
Comment #17
anrikun CreditAttribution: anrikun commentedDrupal 7.17
CKEditor 7.x-1.x-dev (from GIT)
ckeditor-dev (from GIT)
=> get JS error on node edit:
Note that this error does not occur when using the standard package of CKEditor 4. So I guess this is related to some plugin that comes with the full package.
Comment #18
dczepierga CreditAttribution: dczepierga commented@anrikun, could u add in
includes/ckeditor.utils.js
afterDrupal.ckeditor_ver = CKEDITOR.version.split('.')[0];
(line 47) following code:console.log("CKE version: " + Drupal.ckeditor_ver);
?After add this refresh page and check console (Firebug, Chrome Console...) which version of CKE do u see there and write it here, because it's look like it doesn't parse CKE version or do it wrong...
Greetings
Comment #19
dczepierga CreditAttribution: dczepierga commentedI change choosing skin and uicolor - now it works in iframe - it was needed for CKEditor v4 because it not possible to change skin or use few editors with diffrent skins on one page. Of course it works also with CKEditor v3.
I commit all changes to GIT (diff)
Greetings and again really thx for help
---------------------------------------------------------------
EDIT:
New feature - checking skin availibility on CKEditor configuration page.
I've add this because CKEditor v4 doesn't has "kama" skin in default package (it is available in CKEditor builder or addons), so now if user has selected skin which not exists (skin files not found) warning will be displayed in CKEditor configuration page.
Changes commited to GIT (diff).
Greetings
Comment #20
anrikun CreditAttribution: anrikun commented@dczepierga (#18)
It reports "%VERSION%" because ckeditor-dev does not have any fixed version.
I guess there's nothing to do about this :-(
Or maybe change condition to:
Comment #21
dczepierga CreditAttribution: dczepierga commentedYou have right, it's better to change this condition... it will be much easier for developers to use it if they write sth for Drupal and using CKEv4 from GIT.
Changes commited to GIT (diff)
Comment #22
dczepierga CreditAttribution: dczepierga commentedI add next changes:
- cleaup code in ckeditor.admin.js - related with uicolor
- disable config field in uicolor plugin
- set skin of profile if saved not exists, then select default one (moono or kama) or select first on the list
All changes commited to GIT (diff)
Comment #23
dczepierga CreditAttribution: dczepierga commentedFix CKEditor version detect for configuration options in admin panel.
Changes commited to GIT (diff).
Comment #24
dczepierga CreditAttribution: dczepierga commentedI commit fix for MediaEmbed plugin (diff).
Greetings
------------------------------
EDIT:
Add check if
divarea
plugin exists. If not configuration option in CKEditor profile is not visible.Changes commited to GIT (diff).
Comment #25
mkesicki CreditAttribution: mkesicki commentedComment #26
Optalgin CreditAttribution: Optalgin commentedEditor doesn't load when using latest CKEditor 4.0
I copied ckeditor 4 into sites/all/modules/ckeditor/ckeditor4 and
change the editor directory under admin/config/content/ckeditor/editg into %m/ckeditor4
Then instead of getting editor I get white area
I tried to edit and resave all my profiles (basic and advanced) - Nothing worked
Reverting to 3.x.x %m/ckeditor worked
Comment #27
dczepierga CreditAttribution: dczepierga commented@Optalgin, could u write here your errors in Firebug (Firefox addon)?
Greetings
Comment #28
Optalgin CreditAttribution: Optalgin commentedckeditor.utils.js line 46
Let me know if you need more info
Comment #29
Optalgin CreditAttribution: Optalgin commentedSorry, my mistake. Looks like my module upgrade failed
Using the latest 7.x-1.11 solved my problem
However upgrade didn't work right away
I got the following errors regarding the skin
I re-saved all profiles and also saved my user profile as described in #1854454: CKEditor interface not showing up on clean Drupal 7 install
Now everything works fine
Comment #30.0
(not verified) CreditAttribution: commentedmore info