Closed (fixed)
Project:
Wysiwyg
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
6 May 2010 at 15:14 UTC
Updated:
31 Aug 2012 at 13:01 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
twodThe Wysiwyg template plugin is a project dedicated to work with the template plugin for TinyMCE, but the maintainer seems interested in integrating with other editors as well. Probably a good place to start building a GUI and cross-editor template handling before Wysiwyg itself has these capabilities. Wysiwyg itself still needs a lot of work on its core features before this plugin becomes useful without having to modify library files, so I'm going to postpone this until we have a better framework to handle it.
Note that when #313497: Allow configuration of advanced editor settings gets in, it should be possible to set settings like templates_files and templates_replaceContent (CKEditor) so at that point it would make more sense to include this button. (The user would be able to point the editor to a template file other than the default one, so it wouldn't be overwritten when updating the editor library.)
Comment #2
mandclu commentedSorry if this seems like I'm hijacking an old thread. In the comments on my case study it was suggested I submit back the changes I made in order to make Templates a useful function on the site detailed there.
In fact, this patch adds the line suggested by btopro in the original issue, as well as an extra line that turns off the default to replace all content, which was critical for us and I think makes more sense in a Drupal context. I suppose in theory you could make that a separate setting.
I agree with TwoD that this would be better addressed as part of a larger thrust to address advanced settings, which will allow for customizing the templates themselves without hacking files. That thread seems to have been moved up to 7.x, however, and I think there's something to be said for making this feature available to 6.x users.
As for Wysiwyg Template, installing an entire module to accomplish something that can be achieved in a line two seems excessive, IMO.
Comment #3
eigentor commentedThx surge_martin. This patch is simple indeed, helped me activate the Templates feature for CKeditor. Sure - one has to edit the CKeditor templates file and all and this will be much cleaner in the future, but for the time being, it just works for the people that know how to use it.
This is how the button looks
And this is the popup with the predefined CKeditor Templates. Inserting them works fine, and, thanks to the patch, does not replace the entire content but rather add to it.
Comment #4
esbon commentedPlease add the Source and Templates to the list of buttons and plugins.
Please disregard this comment!
Comment #5
marcoka commentedWas not thinking right. Its working, but remember to activate it on the wysiwyg profila page after applying the patch
Comment #6
andyf commentedApplied the patch and works for me, thanks!
Comment #7
firebird commentedNote to anyone looking for the Drupal 7 way of using templates; There's a module for that: http://drupal.org/project/wysiwyg_template
Comment #8
btopro commentedit's great for D6 too and I use it now without any need to patch either. I'm not sure what to mark this other then closed because there's something that satisfies the original need of this issue