I have created a plugin that allows users to insert little blocks of predefined HTML code. It is similar to the builtin Templates feature but doesn't overwrite all the code that already exists in the editor. It works pretty well! You can get it at http://www.polites.net/projects/
Wed, 05/10/2006 - 00:24
#1
RE: Snippets Plugin
It sounds similar like this one:
https://sourceforge.net/tracker/index.p ... tid=737639
or this patch:
https://sourceforge.net/tracker/index.p ... tid=543655
I just hope that Frederico adds the patch in the next version
RE: Snippets Plugin
RE: Snippets Plugin
But you have learnt how to make a plugin and now if you need any change you can do it easier
It's good that the people share their code in order to improve this editor.
RE: Snippets Plugin
RE: Snippets Plugin
My directory structure is like this, and I upgrade in seconds to a new version (only need to change the basepath):
/FCKmyConfig.js
/FCKeditor_2_0/
/FCKeditor_2_1/
/FCKeditor_2_1_1/
/FCKeditor_global/
'- images/smiley/
'- plugins/
'- skins/
'- fckstyles.xml
'- fcktemplates.xml
RE: Snippets Plugin
Did the plugin work for you with my changes? I haven't heard back anything to the positive yet.
RE: Snippets Plugin
Great stuff!
RE: Snippets Plugin
If your snippets folder is not /FCKeditor/editor/plugins, it doesn't find the script.
RE: Snippets Plugin problem - fixed
Hi all,
Firstly thanks greggp for this excellent plugin.
I had a problem with it though ... it was caused by the method used to insert the snippet HTML. It was failing in IE when the html contained certain elements such as lists. This is a known issue with IE mentioned in many places such as here:
http://xinha.python-hosting.com/ticket/129
The solution was to use FCK's own method to insert HTML and this seems to work fine. You can apply this fix by modifying the SelectSnippet function in SnippetsBrowse.html
function SelectSnippet( index )
{
oEditor.FCKUndo.SaveUndoStep() ;
oEditor.FCK.InsertHtml( FCK._Snippets[index].Html ) ;
window.parent.Cancel() ;
}
Cheers
Ben
RE: Snippets Plugin problem - fixed
I'm glad it helps you.
RE: Snippets Plugin (snippets.xml location)
Best Regards