1
rlankford
TinyEditor and the Comment Engine
  • 2007/9/26 13:38

  • rlankford

  • Not too shy to talk

  • Posts: 158

  • Since: 2004/8/27


I've recently changed my default editor to the Tiny Editor. And I've actually changed the default editor for XOOPS too. There are instructions for doing this in the TinyEditor documentation (great PDF, by the way!) in the section titled "Making tinyeditor the default editor for Xoops"

Basically, you edit xoops/class/xoopsform/formddhtmltextarea.php and change the $htmlEditor variable so that it uses the tiny editor instead.

This sounded great, so I did it. But I was too quick to jump the gun. Because although this seems to work great, the default dhtml editor for XOOPS is now storing html in the database whereas before it was just storing text with bbcodes placed in it.

So now, for instance, whenever someone posts a comment on my site, they get the TinyEditor, type in some stuff, and see the HTML text (not translated by the browser but rendered as raw html text) on the screen.

Does anyone know how I can alter this behavior? I'm going to disable the TinyEditor as the default editor for the time being until I can understand better this process of storing and retrieving HTML to and from the database better.

2
frankblack
Re: TinyEditor and the Comment Engine
  • 2007/9/26 13:52

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


Could be a long post, so hold on!

This is experimental and not tested and might only work in theory.

1. you need the latest orginal tinyMCE editor from tinymce.moxiecode.com, download it and extract the package

2. copy from plugins (somewhere in the folder structure) the folder bbcode to place where the plugins are located inside tinyeditor

3. edit tinyeditor / include / initcode.php and change from:
echo '",';
    echo 
"themes : 'advanced',";


to:

echo ',bbcode",';
    echo 
"themes : 'advanced',";


and from:

echo 'debug : false';


to:

echo 'entity_encoding : "raw",
    add_unload_trigger : false,
    remove_linebreaks : false,'
;
    echo 
'debug : false';


What happens now is, that i.e. [ b ] is converted to strong when you are in edit mode and when saved converted back to [ b ].

To make it as a configurable options for groups is a bit more tricky and to be honest: I don't know if it works for you, but it is worth a try I think, so GOOD LUCK!

Login

Who's Online

282 user(s) are online (206 user(s) are browsing Support Forums)


Members: 0


Guests: 282


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits