Opened 14 years ago
Closed 12 years ago
#1904 closed defect (wontfix)
[Editor2 / TableOperation-Plugin] inconsistent code generation (transitional vs. strict)
Reported by: | guest | Owned by: | liucougar |
---|---|---|---|
Priority: | high | Milestone: | 1.3 |
Component: | Editor | Version: | 0.4 |
Keywords: | editor css html-generation (transitional vs strict) | Cc: | |
Blocked By: | Blocking: |
Description (last modified by )
I want to transform the content of the editor via XSLT into other formats. Therefore I need to parse the generated HTML with all the style information.
The problem: Without the TableOperation?-plugin being active, if table width/height are changed via drag&drop the followong code is generated
<table style='width: 214px;height: 38px'>...
When the TableOperation? plugin is active and the user changes e.g. alignment, then the HTML code is automatically changed to something like
<table align="center" width="214">...
This makes the parsing of the generated HTML much more complicated.
Therefore it would be great, if the editor and its standard-plugins would only generate STRICT HTML. This means: style information only via style-attributes. No deprecated attributes such as width, align, ...) and no deprecated tags such as <font size=...> Is this easy to change? Thanks for your help!
Attachments (1)
Change History (7)
Changed 14 years ago by
Attachment: | bFilters.js added |
---|
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
that looks like a possible workaround. how can i use these filters? I implemented the following method in my inherited editor, but it prevents my editor from loading:
...
dojo.require("dojo.widget.Editor2Plugin.bFilters");
...
getEditorContent: function(){
var content = dojo.widget.Editor2Vis.superclass.getEditorContent.call(this); return tidy_tags(content);
}, ...
comment:3 Changed 14 years ago by
Milestone: | → 0.6 |
---|
comment:4 Changed 13 years ago by
Milestone: | 1.0 → 2.0 |
---|
comment:6 Changed 12 years ago by
Description: | modified (diff) |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
Realistically I don't see us putting this into the Editor code.
If someone wants to work on it we can reopen the ticket.
I just attached a couple of filters I made - I think they work well. The 'tidy_tags' and 'untidy_tags' are used as post and pre filters to allow the browser to edit with the deprecated tags, but the result (or html-mode view) is always styles. So far it just changes b and i to strong and em, and font tags to styles but I'm sure you could add more to it. -=Bruce Webster.