Ticket #6628 (closed Bug: fixed)

Opened 4 years ago

Last modified 4 years ago

Setting config.enterMode from PHP fails

Reported by: Webunity Owned by:
Priority: Normal Milestone: CKEditor 3.5.1
Component: Server : PHP Version: 3.1
Keywords: HasPatch Cc: gilles@…, d.czepierga@…

Description

Using this code fails;

[php] $this->configenterMode? = 'CKEDITOR.ENTER_BR'; $this->configshiftEnterMode? = 'CKEDITOR.ENTER_P'; php

However, setting thesame in the config.js works. Tested with PHP5 class, but problem exists in PHP4 class also i think..

Attachments

#6628_ticket.patch (1.2 KB) - added by dczepierga 4 years ago.
Patch for ticket #6628

Change History

comment:1 Changed 4 years ago by Webunity

This should read

$this->config['enterMode'] = 'CKEDITOR.ENTER_BR';
$this->config['shiftEnterMode'] = 'CKEDITOR.ENTER_P';

comment:2 Changed 4 years ago by Webunity

Proposed FIX: In the function "private function jsEncode($val)"

Replace:

 $val = str_replace($jsonReplaces[0], $jsonReplaces[1], $val);
 return '"' . $val . '"';

With:

 $val = str_replace($jsonReplaces[0], $jsonReplaces[1], $val);
 if (strtoupper(substr($val, 0, 9)) == 'CKEDITOR.') return $val;
 return '"' . $val . '"';

comment:3 Changed 4 years ago by Webunity

  • Cc gilles@… added

comment:4 Changed 4 years ago by fredck

  • Status changed from new to confirmed
  • Keywords HasPatch added
  • Milestone set to CKEditor 3.6

Interesting approach for it.

comment:5 Changed 4 years ago by wwalc

  • Milestone changed from CKEditor 3.6 to CKEditor 3.5.1

Changed 4 years ago by dczepierga

Patch for ticket #6628

comment:6 Changed 4 years ago by dczepierga

  • Cc d.czepierga@… added
  • Version set to 3.5.1 (SVN - trunk)

I check FIX made by Webunity and make patch for PHP5 and PHP4. I test it on both version of PHP and everything seems to work.

comment:7 Changed 4 years ago by wwalc

  • Version changed from 3.5.1 (SVN - trunk) to 3.1

comment:8 Changed 4 years ago by wwalc

  • Status changed from confirmed to closed
  • Resolution set to fixed

Fixed with [6282].

Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy