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

CKeditor update #348

Closed
qwerg opened this issue Jan 10, 2013 · 7 comments
Closed

CKeditor update #348

qwerg opened this issue Jan 10, 2013 · 7 comments

Comments

@qwerg
Copy link
Member

qwerg commented Jan 10, 2013

I think it's necessary to upgrade the text editor to the CKeditor last release (4.01)
http://ckeditor.com/download
before releasing some customizations (images placeholders, drag n drop etc)
see #190

@stefanorosanelli
Copy link
Member

@xho worked recently with CKeditor 4 - he could help

edoardocavazza added a commit that referenced this issue Mar 20, 2013
default config ckeditor 4
@ghost ghost assigned qwerg and edoardocavazza Mar 20, 2013
@batopa
Copy link
Member

batopa commented Mar 20, 2013

The Rich Text Editor in the Newsletter Module is broken after replacement of CKeditor with CKeditor4.

There are a bunch of things to do:

  • initialization (related textarea are in views/newsletter/inc/form_template.tpl and views/newsletter/inc/form_contents_newsletter.tpl)
  • configuration (see buttons and other things from old CKeditor configuration)
  • hook bedita plugin used in in newsletter template view (you can see it in old ckeditor/plugins/beditacontentblock folder) and eventually correct it according new CKeditor4 api
  • handle css inside CKeditor on Publication changing in template view (/newsletter/viewMailTemplate) and on template changing in compose message view (/newsletter/viewMailMessage)

@batopa
Copy link
Member

batopa commented Mar 20, 2013

The CKeditor4 initialization in form_textbody.tpl is done also if another RTE as tinyMCE is used. But in that case the ckeditor.js isn't loaded and a javascript error is triggered.

CKEDITOR.replace( 'data[abstract]' );
CKEDITOR.add

The above code and other initializations would be in specific initialization js file loaded when CKeditor4 is used.

In previous version of CKeditor we used jquery adapter and the initialization of a CKeditor instance was done by jQuery selector with specific css class

$( '.richtext' ).ckeditor(configFull);
$( '.richtextSimple' ).ckeditor(configSimple);
$( '.richtextNewsletterTemplate' ).ckeditor(configNewsletterTemplate);

For backward compatibility these classes have to be mantained as selectors of specific instances of the RTE.

@stefanorosanelli
Copy link
Member

Richtext editors in many modules (core and plugins) are not working anymore.
For instance description fields for * glossary, tickets and addressbook ....

I agree with @batopa: in a .tpl file you should just write down a class to define a richtext editor, like:

<textarea class="richtext" name="data[description]"> .... </textarea>

without having to code javascript or other stuff - otherwise we have to modify many .tpl files every time we change editor....

edoardocavazza added a commit that referenced this issue Mar 21, 2013
- ckeditor_default_init.js and jquery adapter added. Now, ckeditor 4 replacement starts only when the editor is setted as default
@stefanorosanelli
Copy link
Member

Now all richtext fields seem ok again, apart from newsletter (didn't test it)
Fixed also tickets module.
@batopa what about newsletters? If ok we can close.

@batopa
Copy link
Member

batopa commented Mar 22, 2013

About Newsletter module:

Template

url: /newsletter/viewMailTemplate

  • the richtext editor conf and init should be stay in ckeditor_default_init.js as in old ckeditor. Now they are in the view file.
  • the button to add the delimitator named "contentblock" has to be disabled when 2 delimitators are present and enabled when there are 1 or 0 delimitators.

Newsletter message

url: /newsletter/viewMailMessage

  • richtexteditor doesn't work, there is a notice in the javascript included in the view.
  • As above, all init and conf have to be moved in ckeditor_default_init.js

edoardocavazza added a commit that referenced this issue Mar 26, 2013
batopa added a commit that referenced this issue Mar 26, 2013
When template associated to newsletter message haven't css use the default
/css/newsletter.css file
batopa added a commit that referenced this issue Mar 26, 2013
* disable button if two bedita content blocks are present
* enable button if less then two content blocks are present
batopa added a commit that referenced this issue Mar 27, 2013
add default conf for newsletter message that doesn't show html outline blocks
edoardocavazza added a commit that referenced this issue Mar 27, 2013
correct a bug that prevents to save documents
batopa added a commit that referenced this issue Mar 27, 2013
batopa added a commit that referenced this issue Mar 27, 2013
batopa added a commit that referenced this issue Mar 27, 2013
if tinyMCE isn't used then tinyMCE trigger is excluded in autosave function
batopa added a commit that referenced this issue Mar 27, 2013
@batopa
Copy link
Member

batopa commented Mar 27, 2013

Now it seems all work well. We open specific issues for bug or correction.
Close

@batopa batopa closed this as completed Mar 27, 2013
nikazzio pushed a commit that referenced this issue Apr 4, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants