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

undo / redo and switching to standard mode CKE #43

Closed
santaclaus21 opened this issue Dec 11, 2013 · 13 comments
Closed

undo / redo and switching to standard mode CKE #43

santaclaus21 opened this issue Dec 11, 2013 · 13 comments

Comments

@santaclaus21
Copy link

orginal source (in CKE 4.3):

<p>Z okazji zbliżających się Świąt Bożego Narodzenia - pragniemy życzyć Państwu....</p>

step 1 - backspace anywhere
step 2 - switch to source editing
step 3 - switch to normal editing mode
step 4 - undo
then source will be:

<p>Z okazji zbliżających się Świąt <span id="cke_bm_291C" style="display: none;">&nbsp;</span>o Narodzenia - pragniemy życzyć Państwu....</p>
or:

step 1: backspace anywhere
step 2: undo
step 3: switch to source
then:

<p>Z okazji <span id="cke_bm_381C" style="display: none;">&nbsp;</span>zbliżających się Świąt Bożego Narodzenia - pragniemy życzyć Państwu....</p>
@w8tcha
Copy link
Owner

w8tcha commented Dec 11, 2013

I can not reproduce this on the demo page http://w8tcha.github.io/CKEditor-CodeMirror-Plugin/demoFramed.html

Could be browser related. Which browser did you used?

@santaclaus21
Copy link
Author

Google Chrome. Maybe its up to config or version. I'll try to find dependence.

and my config file:

/**
 * @license Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
 * For licensing, see LICENSE.html or http://ckeditor.com/license
 */

CKEDITOR.editorConfig = function( config ) {
    // Define changes to default configuration here.
    // For the complete reference:
    // http://docs.ckeditor.com/#!/api/CKEDITOR.config

    // The toolbar groups arrangement, optimized for two toolbar rows.

  config.toolbar_MyToolbar =
  [
      ['Source','-','NewPage','Preview'],
      ['Cut','Copy','PasteText','PasteFromWord','-','Scayt'],
      ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
      ['Image','Table','HorizontalRule','SpecialChar','PageBreak'],['Maximize', 'ShowBlocks'],
      '/',
      ['Format'],['Bold','Italic','Underline'],['TextColor'],
      ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],
      ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
      ['Link','Unlink','Anchor'],['Save']

  ]; 

  config.toolbarGroups = [
        { name: 'clipboard',   groups: [ 'clipboard', 'undo' ] },
        { name: 'editing',     groups: [ 'find', 'selection', 'spellchecker' ] },
        { name: 'links' },
        { name: 'insert' },
        { name: 'forms' },
        { name: 'tools' },
        { name: 'document',    groups: [ 'mode', 'document', 'doctools' ] },
        { name: 'others' },
        '/',
        { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
        { name: 'paragraph',   groups: [ 'list', 'indent', 'blocks', 'align' ] },
        { name: 'styles' },
        { name: 'colors' },
        { name: 'about' }
    ];


    // Remove some buttons, provided by the standard plugins, which we don't
    // need to have in the Standard(s) toolbar.
    config.toolbar = 'MyToolbar';
  //config.removeButtons = 'Flash,Underline,Subscript,Superscript,Font,Style';
  config.contentsCss = '/css/style.css';
  config.uiColor = '#C1C1C1';
  config.htmlEncodeOutput = false;
  config.pasteFromWordRemoveFontStyles = true;
  config.pasteFromWordRemoveStyles = false;

  config.allowedContent = 'a[!href]; ul; li{text-align}';

  config.extraPlugins = 'webkit-span-fix';  

  config.filebrowserBrowseUrl = '/admin/js/ckeditor/elfinder/elfinder.html?mode=file';
  config.filebrowserImageBrowseUrl = '/admin/js/ckeditor/elfinder/elfinder.html?mode=image';

  config.filebrowserWindowFeatures = 'resizable=no,scrollbars=no';  
  config.filebrowserWindowWidth = 980;
  config.filebrowserWindowHeight = 550;

  //config.enterMode = CKEDITOR.ENTER_BR;
  //config.shiftEnterMode = CKEDITOR.ENTER_P;
  //config.removeFormatTags = 'td';
    //config.entities = false;
  //config.entities_greek = false;
  config.entities_latin = false;
};

@santaclaus21
Copy link
Author

It seems to be the same when I using default config... I'm using version (4.3 / 4.3.1) compiled by CKBuilder with Codemirror.

Addition, after steps 1-4 I've got 2 undo instead of 1. First one leaves junk span and last one is fine.

I've googled some similar: http://dev.ckeditor.com/ticket/8232

And it doesn't happend on demo page for me: http://w8tcha.github.io/CKEditor-CodeMirror-Plugin/demoFramed.html :/

@w8tcha
Copy link
Owner

w8tcha commented Dec 11, 2013

Did you download my plugin via the CKBuilder? If yes can you reproduce the problem when manually downloading the plugin?

@w8tcha
Copy link
Owner

w8tcha commented Dec 11, 2013

I download the custom ckbuilder version including codemirror, but i still can not reproduce this. Can you attach your demo page where this issue occurs?

@santaclaus21
Copy link
Author

"I'm using version (4.3 / 4.3.1) compiled by CKBuilder with Codemirror" Builder.
Build: http://ftp2.jordan.pl/WJablonski/ckeditor_4.3.1.zip

Demo:
http://autobusywieden.pl/admin/
login / passwd: github / github

to see CKE you need to click on "więcej" in 9th column.

Acces is only for 72 hours. Please, don't clik on "usuń" or "zapisz" :)

@w8tcha
Copy link
Owner

w8tcha commented Dec 11, 2013

On your demo page i can reproduce it, i see there i a strange plugin called "webkit-span-fix", what happens when you remove that?

At this point it is impossible for me to fix that, until i can reproduce this locally.

@santaclaus21
Copy link
Author

Clear browser cache. Now it's default config without using this plugin. The same... I was trying also before "It seems to be the same when I using default config... I'm using version (4.3 / 4.3.1) compiled by CKBuilder with Codemirror.".

Have you trying to use my compilation locally: http://ftp2.jordan.pl/WJablonski/ckeditor_4.3.1.zip ?

@w8tcha
Copy link
Owner

w8tcha commented Dec 11, 2013

If you are using the default config it will still load all extra plugins, you need to delete the plugin or add the plugin to the removePlugins list in the config

@santaclaus21
Copy link
Author

removed. The same.

@santaclaus21
Copy link
Author

Still the same problem with github version. Version from CKE Builder is fine. So, latest github version:

image

And I have to use AutoSave from GIT and CodeMirror from CKEBuilder to get it works both.

@santaclaus21
Copy link
Author

I'm not sure, but problem may going from "Keep Text Selection" plugin http://ckeditor.com/addon/textselection. There maybe is conflict with codemirror. I can't find clear reason. After remove that plugin - everything is working fine. So probably this bug is corresponding to TextSelection plugin....

@santaclaus21
Copy link
Author

I've updated also Keep Text Selection plugin from GitHub and everything is looking fine.
I'm pretty sure that all described problems was going from KeepTextSelection...
CKEBuilder versions are not updated - thats all.

BTW: kama skin (icons background on sourcedialog) is looking good (too long background).

I use 5 (3rd) plugins, and 3 are yours! So I have to THANK YOU for good job!

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

No branches or pull requests

2 participants