Code Monkey home page Code Monkey logo

dojo-ckeditor's People

Contributors

spalax avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

websoftix

dojo-ckeditor's Issues

Window scrolls up a bit everytime the texterea gets focus.

I'm not shure if this is just a local problem in my code, but everytime the editor gets focus, the window scrolls up a bit (untill the editor has scrolled out of view).

The problem is triggered on line 42-44:
this.editor.on('focus', lang.hitch(this, function (){
this._onFocus();
}));

The "real" problem seems to lie in dijit/form/_FormWidgetMixin.js on line 132 (this is the _onFocus method):
winUtils.scrollIntoView(this.domNode);

This problem seems to go away if I just remove the code on line 42-44 in Editor.js.
But I'm not shure what sideeffects this can result in?

declarative syntax and value init

Hi,

First of all thanks for the good work... I just found the new CKEditor and it looks so much better than dijit/Editor that i had to try to replace it.

For the most part this was very simple... included your module the CKEditor and it almost instantly worked like i was expecting...

So i wrote:

<textarea data-dojo-type="dojo-ckeditor/Editor" id="messageEditor" name="message">
      ${portalMessage.message}
      <script type="dojo/on" data-dojo-event="change" data-dojo-args="value">
        alert("change called... ghmmmmm " + value);
      </script>
    </textarea>

and is JS:
first attempt...

    var CKEDITOR_BASEPATH = '${ckeditorUrl}';
    require(["dojo/parser", "dojo-ckeditor/Editor", "dojo/domReady!"], function (parser, Editor) {
      parser.parse();
    });

this one almost works... except that the text in the textarea is not used to populate the editor.

second attempt...

    var CKEDITOR_BASEPATH = '${ckeditorUrl}';
    require(["dojo-ckeditor/Editor", "dojo/domReady!"], function (Editor) {
      new Editor({}, 'messageEditor');
    });

hmmm.... exactly the same result...

then i tried

    var CKEDITOR_BASEPATH = '${ckeditorUrl}';
    require(["dojo-ckeditor/Editor", "dojo/domReady!"], function () {
      CKEDITOR.replace('messageEditor');
    });

which works as expected...

Not that i know what is going on but i guess you are replacing the domNode textarea when creating the widget (which would destroy original dom with value) and only after that do we call the CKEDITOR.replace, but by that time there is no textarea holding the value anymore... just a guess from what i understand of dojo - which i just started using.

Is this an issue? should i manually set the value each time?

cheers,
P.

Error message when widget is destroyed.

Hello!

I've just found and tried your widget and it seems to be working quite fine.
I'm using the ckeditor-widget as a InlineEditBox.

The only problem I have is when the edit-form is destoyed and this widget destroyed, then I get a error message.
dojo-ckeditor.Editor [true]
TypeError: a is null
Editor.js (row 89)

The problem seems to be this line:
this.editor && this.editor.destroy();

If I just remove that line I don't get any error, and as fare as I see, the widget gets destoryed anyway (the number of registered dijit-widgets gets restored to the number they where before this ckeditor was created).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.