Показать сообщение отдельно
  #14 (permalink)  
Старый 19.11.2013, 11:13
Аспирант
Отправить личное сообщение для piraids Посмотреть профиль Найти все сообщения от piraids
 
Регистрация: 20.08.2013
Сообщений: 88

Решил проблему следующим образом:

в ck editor в ckeditor/plugins/image/dialogs/image.js

вставил такой кусочек кода:
,
						{
							id : 'colorBox',
							type : 'select',
							label : editor.lang.common.zoom,
							'default' : '',
							items :
									[
										[ editor.lang.common.notGallery , ''],
										[ editor.lang.common.single , 'activeCBox']
									],
							setup : function( type, element )
									{
										if ( type == IMAGE )
											{
												var value = this.getValue();
												this.setValue( element.getAttribute( 'class' ) );
											}
									},
							commit : function(type, element) {
									if ( type == IMAGE )
										{
											if ( this.getValue() || this.isChanged() )
												element.setAttribute( 'class', this.getValue() );
										}
									}
						}


а в вызове colorbox'а сделал так:
<script>
									$(document).ready(function(){
										$('img.activeCBox').click(function() {$(this).colorbox({href: $(this).attr('src')});
										});
									});
						</script>
Ответить с цитированием