Opened 12 years ago

Closed 9 years ago

Last modified 9 years ago

#6062 closed defect (fixed)

Editor constructor initialization attributes get overwritten if you pass them in on construction

Reported by: ptwobrussell Owned by: Jared Jurkiewicz
Priority: high Milestone: 1.6
Component: Editor Version: 1.0
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

From what I gather, the Editor's constructor (RichText?.js) pushes some private pre and post filters into contentPreFilters and postPreFilters, which means that if you pass in your own contentPreFilters and contentPostFilters (like you would using the standard ({/*props*/}, node) type creation pattern) to the constructor function then these defaults get lost since _Widget.create is kicked off from postscript, which obviously happens after constructor. This has the noticeable effect of preventing routines like _removeMozBogus from getting run as postfilters, which strips out intermediate attributes that are written in to annotate dirty elements, etc.

Seems like maybe some thought should go into how we could tame this API a bit (in general, maybe in another ticket) and take into account issues like the one described. If Editor has a huge API *and* adds various exceptions to the rule, then it's going to make it that much harder for people to just pick up and use.

Attachments (1)

editor_progFilters.patch (4.3 KB) - added by Jared Jurkiewicz 9 years ago.
Patch fo fix preserving builtin filter rules when user programmatically defines them + UT

Download all attachments as: .zip

Change History (8)

comment:1 Changed 12 years ago by dylan

Milestone: 1.2

mass move of editor issues to 1.2.

comment:2 Changed 11 years ago by bill

Description: modified (diff)
Milestone: 1.21.3

Moving to 1.3 until after the Editor iframe refactor is hopefully finished.

comment:3 Changed 11 years ago by bill

Milestone: 1.31.4

comment:4 Changed 10 years ago by bill

Milestone: 1.4future
Owner: liucougar deleted

comment:5 Changed 9 years ago by Douglas Hays

Owner: set to Jared Jurkiewicz

Changed 9 years ago by Jared Jurkiewicz

Attachment: editor_progFilters.patch added

Patch fo fix preserving builtin filter rules when user programmatically defines them + UT

comment:6 Changed 9 years ago by Jared Jurkiewicz

Resolution: fixed
Status: newclosed

(In [22675]) Fixing issue with builtin filters being lost if user provides a programmatic filter array on construction. \!strict fixes #6062

comment:7 Changed 9 years ago by bill

Milestone: future1.6
Note: See TracTickets for help on using tickets.