spalax / dojo-ckeditor Goto Github PK
View Code? Open in Web Editor NEWCKEditor integrated as DojoFormElement as a part of Dojo Toolkit
License: MIT License
CKEditor integrated as DojoFormElement as a part of Dojo Toolkit
License: MIT License
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?
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.
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).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.