Ticket #3588 (new New Feature)

Opened 16 months ago

Last modified 12 days ago

Templates plugin: no option to load from xml file

Reported by: alfonsoml Owned by:
Priority: Normal Milestone:
Component: General Version: SVN (CKEditor) - OLD
Keywords: Discussion Cc:

Description

Currently the templates plugin only allows to load the data from a js file without an option to use a XML like v2.

This has some drawbacks:

  1. It's not possible to reuse existing templates. Asking the people to rewrite their templates can be a big issue as it might involve other tools that they had setup to provide custom templates for each client.
  2. A json file is more complex to write correctly than a XML. To verify that a XML file is valid they just have to open it in the browser, and it will point to any error. Validating the js file will be more complex and I guess that most of the people will follow the trial and error approach, leading to frustration as now they have to learn the javascript rules in order to make it work.
  3. Managing XML files seems easier to me. I think that any framework has tools to read/write xml files, merging them, etc...

So I suggest to improve the templates plugin allowing to load templates from XML files with the syntax from V2.

Change History

in reply to: ↑ description   Changed 16 months ago by garry.yao

  • keywords Pending added

Replying to alfonsoml:

Currently the templates plugin only allows to load the data from a js file without an option to use a XML like v2. This has some drawbacks:...

The migration would definitely be a obstacle for adapting JSON-based templates, while the pros are significant:

  • cross-domain templates with JSONP
  • PF more better than XML

So perhaps the ultimate solution is going to provide an optional plugin for xml templates migration.

  Changed 16 months ago by alfonsoml

I didn't suggest to remove the new format at all. I know that it's useful to load data cross-domains (although it worries me a little that the file isn't only data, but also includes the code to load that data)

I don't understand what you mean with "PF". Performance? Maybe, but I know that this morning I had to include a new template. In order to do so I just had to open the xml file, copy one of them and then paste in the Html block all the code. I didn't have to worry about how to encode, put quotes or anything else. Paste, save and it's ready.

So this is a reason to allow both systems, but as I said, the most important reason to allow XML is the upgrade from current installs.

  Changed 14 months ago by fredck

  • milestone set to CKEditor 3.1

  Changed 10 months ago by garry.yao

  • keywords Discussion added; Pending removed
  • milestone changed from CKEditor 3.1 to CKEditor 3.2

  Changed 9 months ago by monty241070

I am doing a migration from FCKEditor to CKEditor now, and too find it a hurdle that the XML format is no longer there. I will consult our users on this but given >100 Kb of templates in XML format, I think this will lead to a no-go.

Allowing loading of the old XML format would allow beter adoptation I think.

  Changed 9 months ago by fredck

I think having a tool to convert formats would already be a nice thing... eventually making it possible to edit the template contents in page through a list and a form... contributions are welcome ;)

  Changed 8 months ago by fredck

  • milestone changed from CKEditor 3.2 to CKEditor 3.3

  Changed 6 months ago by fredck

  • milestone changed from CKEditor 3.3 to CKEditor 3.x

  Changed 4 months ago by monty241070

Is it expected that that a migration scenario will be available somewhere in the next 3 months? Or does 3.x milestone mean: 'some future release'.

  Changed 7 weeks ago by fredck

  • milestone CKEditor 3.x deleted

Milestone CKEditor 3.x deleted

  Changed 4 weeks ago by comp615

This is really a huge pain to have to convert every style xml, every template xml, etc to JS. I think this is the one place that retro-XML support should exist.

  Changed 12 days ago by fredck

Ok, as no one stepped up to provide a conversion tool, here you have it: #6199.

Note: See TracTickets for help on using tickets.