Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#5705 closed defect (fixed)

FontChoice plugin for Editor not working

Reported by: ptwobrussell Owned by: Adam Peller
Priority: high Milestone: 1.1
Component: Dijit Version: 1.0
Keywords: Cc: dante
Blocked By: Blocking:

Description

It appears that the FontChoice? plugin is busted as of r12183. Firebug show a less than helpful "arr has no properties" message, and that's the end of it. I also noticed that as of today, the require statement in the nightly test for the FontChoice? plugin was commented out, so maybe that further confirms that someone else has noticed this. Anyway, I couldn't find an existing ticket about it, so here goes:

The test file:

<html>
    <head>
    <title></title>
    <style type="text/css">
        @import "http://o.aolcdn.com/dojo/1.0/dijit/themes/tundra/tundra.css";
        @import "http://o.aolcdn.com/dojo/1.0/dojo/resources/dojo.css";
    </style>
    <script 
        type="text/javascript" 
        src="http://o.aolcdn.com/dojo/1.0/dojo/dojo.xd.js"
        djConfig="parseOnLoad: true,isDebug:true,debugAtAllCosts:true">
    </script>

    <script type="text/javascript">
        dojo.require("dojo.parser");
        dojo.require("dijit.Editor");
        dojo.require("dijit._editor.plugins.FontChoice");
     </script>
</head>
<body class="tundra">
<div style="margin:5px;background:#eee;">
    <div id="editor" width="475px" dojoType="dijit.Editor"
        extraPlugins="['dijit._editor.plugins.FontChoice']">
        foobar
    </div>
</div>
</body>
</html>

Change History (7)

comment:1 Changed 12 years ago by ptwobrussell

Resolution: duplicate
Status: newclosed

This ticket refs #4971, which I think means that I should go ahead and close it out.

comment:2 Changed 12 years ago by Adam Peller

Resolution: duplicate
Status: closedreopened

Nah, this isn't IE-specific, nor focus-related. I think something's up with the way the plugin is declared. I had tested using the keyword 'fontName' rather than the path of the plugin. I guess both should work. It's kind of awkward that there are two ways of doing this and that the plugin model requires Editor base changes to support the keyword switch (see #5707)

comment:3 Changed 12 years ago by Adam Peller

Milestone: 1.1
Owner: set to Adam Peller
Status: reopenednew

comment:4 Changed 12 years ago by Adam Peller

Status: newassigned

comment:5 Changed 12 years ago by Adam Peller

(In [12207]) Fix regression in FontChoice? - must set store in constructor. Style changes in plugins. Inherit from _Plugin so this.connect won't throw. There was even a dojo.debug in there :-O Refs #5705

comment:6 Changed 12 years ago by Adam Peller

Resolution: fixed
Status: assignedclosed

(In [12209]) Un-b0rk inherited calls. Fixes #5705

comment:7 in reply to:  6 Changed 11 years ago by guest

Replying to peller:

(In [12209]) Un-b0rk inherited calls. Fixes #5705

peller - I just noticed this bug when using an editor in Firefox - threw the 'arr has no properties' error in dojo.map. I'm using stock 1.1 release from dtk.org download. The editor I'm using is this:

<textarea id="field_42" dojoType="dijit.Editor"

height="" plugins="['undo', 'redo', '|', 'cut', 'copy', 'paste', '|', 'bold', 'italic', 'underline', '|', 'indent', 'outdent', 'justifyCenter', 'justifyFull', 'justifyLeft', 'justifyRight', '|', 'foreColor', {name:'dijit._editor.plugins.FontChoice', command:'fontName', generic:true}, 'fontSize', 'insertOrderedList', 'insertUnorderedList', 'createLink', 'insertImage'] " extraPlugins="['dijit._editor.plugins.AlwaysShowToolbar?', 'dijit._editor.plugins.LinkDialog?', 'dijit._editor.plugins.FontChoice?', 'dijit._editor.plugins.TextColor?']" name="biography_1_42" rows="10" cols="40" class="text"></textarea>

I can post a URL if that would be easier.

please add josh@… to CC.

Josh

Note: See TracTickets for help on using tickets.