Reputation: 14154
Trying to use InlineEditBox as it is described in the tutorial.
The code hasn't been changed:
require(["dijit/InlineEditBox", "dijit/form/Textarea", "dojo/domReady!"], function(InlineEditBox, Textarea){
var eb = new InlineEditBox({
editor: Textarea,
autoSave: false
}, "ieb").startup();
});
For some reason, I've got an error:
TypeError: Cannot read property 'on' of null
Running debugger
show that InlineEditBox never initializes. E.g.
new Button()
creates a widget as shown in console, while new InlineEditBox()
returns null.
Upvotes: 0
Views: 75
Reputation: 3330
I have created a jsfiddle and it works as expected.
Can you show us your HTML code.?
<body class="claro">
<div id="ieb">
When you click on this div you'll be able to edit it (in plain text).
The editor's size will initially match the size of the (original) text, but will expand/contract as you type.
</div>
<script>
require(["dijit/InlineEditBox", "dijit/form/Textarea", "dojo/domReady!"], function(InlineEditBox, Textarea){
var eb = new InlineEditBox({
editor: Textarea,
autoSave: false
}, "ieb").startup();
});
</script>
</body>
Upvotes: 1