Thank you again Fabien.
Now its perfect for my purposes!
I hope this change will be usefull for other developers, too!
- Frank
Am 14.01.2007 um 09:25 schrieb Fabien POTENCIER:
Done in r3279.
Fabien
Frank Stelzer wrote:
Hi Fabien,
thank you very much for your great refactoring!
I miss only one little thing.
With your modification, i could not configurate a standard rich
text editor and i have to set in every call of textarea_tag my
special editor.
So is it possible that you could replace this in your backward
compatiblity switch clause:
-----
case true:
case 'tinymce':
$rich = 'TinyMCE';
break;
----
in that:
----
case true:
case 'tinymce':
$rich=sfConfig::get('sf_rich_text_editor','TinyMCE');
break;
----
?
So when one has a special rich text editor he could config it and
it is still BC.
- Frank
Am 13.01.2007 um 22:24 schrieb Fabien POTENCIER:
Hi Frantz,
This is an excellent idea. I implemented a slightly different
approach
in r3271.
Comments are welcome.
Fabien
Frank Stelzer wrote:
Hello,
at the moment it is possible to integrate tinymce or the fck
editor as
rich text editors for textareas.
Now, i have written a sfBBCode plugin on my own (i now that
there is a
official sfBBCodeParser plugin too) and on every symfony core
update i
have to manipulate the textarea_tag function in the
FormHelper.php file so
that i can use my bbcode editor for the admin generator.
So my question is, if it is possible to add some new lines to
this method,
so that one could use an own editor which implements a rich
text interface
of symfony ???
I thought about that in the FormHelper:
==========
if($rich=='sfeditor'){
$editorClass=sfConfig::get
('sf_rich_text_editor_class_name');
if(!$editorClass){
throw new sfConfigurationException('You have to
config your rich text
editor class name.');
}
$sfEditor=new $editorClass();
if(!$sfEditor implements sfRichTextEditorInterface){
throw new sfConfigurationException('The configured
editor does not
implement sfRichTextEditorInterface.');
}
$sfEditor->init($name,$content,$options);
return $sfEditor->toHTML();
}
=====
and then it goes on with:
elseif ($rich == 'tinymce')
{ ........
The according interface which has to be provided by symfony
could look
like this:
===========================
<?php
interface sfRichTextEditorInterface{
/**
* @param string $name
* @param string $content
* @param string $options
*/
public function init($name,$content,$options);
/**
* @return string
*/
public function toHTML();
}
=============================
So now it would be possible that one could write a rich text
editor and
symfony could integrate this editor without changing the core
code! No
matter what this editor actually does!
The only thing a developer has to do is to configure the class
name of the
editor, configure that the sfeditor should be the standard rich
text
editor and to implement sfRichTextEditorInterface.
I would be very happy, if this could be integrated in the core!
- Frank
>
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "symfony
developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---