Opened 10 years ago

Closed 10 years ago

#2879 closed Bug (fixed)

plugin:templates porting from v2

Reported by: Garry Yao Owned by: Frederico Caldeira Knabben
Priority: Normal Milestone: CKEditor 3.0
Component: General Version:
Keywords: Confirmed Cc:

Description

Related v2 tickets:

#49
Safari: "Templates" doesn't work when inserting in the cursor position
#241
Make FCKConfig.TemplatesXmlPath an array
#685
Missing TemplatesXmlPath Property in FCKeditor.cs
#721
Add Keystrokes to Templates
#1012
FCK moves around Templates inside tables
#1046
Templates and stripped new lines
#1068
Templates do not load
#1157
IE,IE7:Templates carriage return not honoured
#1713
FF: unknown text in templates paramter
#2364
Support for parameterized templates
#2509
HTML Comments inside of templates are lost
#2640
Dynamically Generated Templates
#2879
plugin:templates porting from v2
#3264
Templates
#3270
FCKeditor for Mediawiki: Templates "manual" menu presents templates in no particular order
#3280
Consecutive Templates get combined on one line
#3306
"Lockable" Templates
#3588
Templates plugin: no option to load from xml file
#3954
Templates in Template dialog not accessible
#5190
Templates dialog: no automatic focus
#5274
[[IE6]] Content Templates dialog is not displaying properly
#5366
JAWS not reading Template Options on Content Templates dialog
#5786
"fckLR" inserted in reference templates breaks citations
#6076
[IE Quirks] Dialogs are not wide enough for their contents / Templates Dialog
#6164
IE stripping object/embed tags with templates
#6425
display {Templates} in editor
#7758
imagesPath for templates has always editor path
#8773
templates_files fails to load template files
#8775
CKeditor custom templates
#9486
Using CKEDITOR.templates for stylesheets
#10188
Append template option to templates plugin
#11236
Widget templates with newlines cause errors
#11507
[PR#78] Templates plugin does not play well with data filtering.
#11530
Dynamic Templates with Dialog Helpers
#11672
EJS templates not preserved by protectedsource
#11828
Content Templates Improvement
#12424
Conflict with Toolbar and Templates...
#12427
The <Templates> node was not found alert Message is coming in IE 11
#12431
The <Templates> node was not found alert Message is coming in IE 11
#12452
<Templates> node was not found Error Message in IE11
#12657
Templates cancel Scayt button
#12727
IndexSizeError on using plugins 'Div Editing Area' and 'Content Templates'

New features in v3:

*Support for multiple template definition files.
*Templates could be loaded cross-domain, e.g. templates loaded from CDN.

Attachments (5)

2879.patch (15.8 KB) - added by Garry Yao 10 years ago.
2879_2.patch (15.2 KB) - added by Garry Yao 10 years ago.
2879_3.patch (14.4 KB) - added by Frederico Caldeira Knabben 10 years ago.
2879_images.zip (1.8 KB) - added by Frederico Caldeira Knabben 10 years ago.
test-empty-template.patch (507 bytes) - added by Garry Yao 10 years ago.
Patch for reproducing empty template definition.

Download all attachments as: .zip

Change History (17)

comment:1 Changed 10 years ago by Garry Yao

Keywords: Confirmed added
Owner: set to Garry Yao
Status: newassigned

Changed 10 years ago by Garry Yao

Attachment: 2879.patch added

comment:2 Changed 10 years ago by Garry Yao

Keywords: Review? added
Version: CKEditor 3.0 Beta

comment:3 Changed 10 years ago by Garry Yao

This patch contain changes to _source/core/dom/domobject.js which is DUP of part of Martin's patch to #2864.

comment:4 Changed 10 years ago by Garry Yao

Keywords: Review? removed

Need to externalize text labels and provide an example of remote template file.

Changed 10 years ago by Garry Yao

Attachment: 2879_2.patch added

comment:5 Changed 10 years ago by Garry Yao

Keywords: Review? added

Most importantly,please review the template definition schema inside _source/templates/default/template.js

comment:6 Changed 10 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review? removed
Owner: changed from Garry Yao to Frederico Caldeira Knabben
Status: assignednew

Your implementation is interesting Garry, but it makes some things too complex. Simpler solutions can be found.

I've rewritten the code based on your patch. No features changes, but much less code. I'm taking the ticket ownership so it can be reviewed properly.

Btw, the template.css loading solution is a nice move. I didn't though that our skin API was so powerful :)

Changed 10 years ago by Frederico Caldeira Knabben

Attachment: 2879_3.patch added

Changed 10 years ago by Frederico Caldeira Knabben

Attachment: 2879_images.zip added

comment:7 Changed 10 years ago by Frederico Caldeira Knabben

Keywords: Review? added; Review- removed
Status: newassigned

Attached the new patch, and the images to be copied inside the "_source/plugins/templates/templates/images" folder.

Changed 10 years ago by Garry Yao

Attachment: test-empty-template.patch added

Patch for reproducing empty template definition.

comment:8 Changed 10 years ago by Garry Yao

Keywords: Review+ added; Review? removed

Fred's patch simplify the template loading codes while still satisfy all basic requirements. Two problems I found:

  1. Empty templates definition is generating errors( Setup with the patch test-empty-template.patch);
  2. Redraw UI every time with template definition already cached seems not that necessary.

The patch should be good in a whole.

comment:9 in reply to:  8 Changed 10 years ago by Frederico Caldeira Knabben

Replying to garry.yao:

Two problems I found

Please open tickets for both issues as soon as we get this one committed.

comment:10 Changed 10 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: assignedclosed

Fixed with [3087]. Click here for more info about our SVN system.

comment:11 Changed 10 years ago by Garry Yao

Keywords: Review+ removed
Resolution: fixed
Status: closedreopened

Initial state of config Replace contents still incorrect in IE, should be due to default vs checked option problem.

comment:12 in reply to:  11 Changed 10 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: reopenedclosed

Replying to garry.yao:

Initial state of config Replace contents still incorrect in IE, should be due to default vs checked option problem.

Please open a new ticket for it.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy