Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

FCKeditor WYSIWYG in Vanilla

edited September 2007 in Vanilla 1.0 Help
Added an extension to enable FCKeditor in Vanilla
you can download it from the Entensions page


  • should we take off the ability to Format comments as Text Html Markdown BBCode ? I tried implementing this - but my message box disappeared altogether.
  • edited October 2006
    i have the html formatter addon installed. There is a code there that disabled the html formatter. can u post the sourcecode of the page your implementing it on, start a new discussion and post the sourcecode. btw did u download the latest version
  • Having problems here also:

    According to the readme:

    1) /path/to/vanilla/extensions/FCKeditor/default.php 2) Download FCKeditor from ( 3) unzip it in /path/to/vanilla/js/FCKeditor/ the path to fckconfig.js should look like that: /path/to/vanilla/js/FCKeditor/fckconfig.js

    1) There is no "fckconfig.js" in the zip file, however there is a vanillaconfig.js.
    2) When default.php is uploaded to extensions>FCKeditor>default.php, and the rest of the files are put into vanilla/js/FCKeditor (as per the readme), the extension does not work [failed ot open stream... extensions/FCKeditor/default.php on line 13 -- which is a call for settings.php].
    3) When the other files (kses, settings, fckstyles) are deleted out of vanilla/js/FCKeditor/(left vanillaconfig.js, and copied and renamed it to fckconfig.js in vanilla/js/FCKeditor/) and placed into vanilla/extensions/FCKeditor/ I get a "Call to undefined function: setdefinition()".

    I have a bunch of other extensions enabled, but this error doesn't look like it's being caused by another extension.

  • you're doing it all weird.
    All the files in the archive you get from the addons site go into /extensions/FCKeditor.
    Then you have to download the actual FCKeditor from
    extract THAT archive into /your_vanilla_root/js/FCKeditor.
    fckconfig.js will now be in /your_vanilla_root/js/FCKeditor. don't touch anything in that folder.
  • Looks like i have to write another readme and clarify that you have to download two different files from two different locations. plus itchy i think ur way of adding the css is the best. little more work for admins, but it works best. It will be the admins job to make the editor.css same as vanilla.css. we just provide them with a sample css which they will have to change. thats fair i think.
  • Sorry ithcy, I was just following the instructions I found in the readme. There are a lot of Homer Simpsons out here... "Shiny buttons, mmmmmmmmmm..."

    I followed your instructions, but am still getting a "call to undefined function: setdefinition()
    [$Context->SetDefinition('FCKeditor', '(X)HTML')] from line 3 of extensions/FCKeditor/settings.php

  • You have to update to vanilla 1.0.1
  • hahaha@a_j

    MySchizoBuddy... if it's done that way, the problem is, the user may have a style which doesn't match the forum style. so the user's comment box may look nothing like the global comment list.

    I think ajax preview is the best way to get this accomplished, i just haven't had time to look into it yet.
  • edited October 2006
    well itchy its the job of the admin to change the included one so it matches its forum style. that should take the admin about 1 min to do. Ajax previews will be nice. For now let the forum creators do some work as well Tinymce gives you a template file to edit for all your previews, so in their its only a matter of making the template use vanilla tags. i couldn't find the template in FCKeditor that it uses for previews. Dinoboff thanks for the heads up.
  • one more time...
    most vanilla installs let users have stylesheets which are different from the forum default. How are you going to tell fckeditor to use the user's stylesheet instead of the one the admin has customized?
    If you just point fckeditor at the user's stylesheet, you get background images and incorrect DOM inside the comment box.
    This is no solution.
  • Oh i didn't know that users can have different stylesheets than forum ones. looks like a dead end. :( one more thing. fckeditor preview page is generated somewhere, we can change it so it generates the same dom as the vanilla forum and then if we link to user style sheet that would work. I think? Tinymce allows u to change the preview page. I couldn't find how to change it in fckeditor. Its becoming more and more problematic. plus users want youtube in fckeditor as well. one way is to create a custom plugin for fckeditor and make a youtube button. that is a lot of work as well
  • ithcyithcy New
    edited October 2006
    yeah, i looked into it. there is no real way to change it in FCK without changing the javascript in a lot of places, and if you've looked at the FCK javascript you know it's a huge nightmare. the editing takes place inside a table cell, and all the javascript refers to that table cell, and of course there are no tables in vanilla comments.

    this is why ajax preview would be best.

    i think making the youtube button might not be so bad. of course they can also switch to source and paste in the youtube link.
  • yeah i can do that, but the code doesn't get posted cause of embed tags being stripped
  • ah yeah
    let's just use Xstandard and forget about FCK ;)
  • edited October 2006
    we cal also go with spaw and openwysiwyg
    in the end each will have its own mess

    how about Xinha
    we can try that
  • ithcyithcy New
    edited October 2006
    hahaha, yeah.

    //oh, Xinha? maybe.
  • edited October 2006
    About the youtube button, there is a solution to allow flash in the editor but let kses strip out most of the object and embed tags.

    Make a button that create the flash code that would start by<object youtube="####"... or <object id="####"... and add to kses allowed tags ... 'object' => array('id' => 1), ...
    You just need to add to the parser:$string = preg_replace('/<object id="([\d\w-_]+)"><\/object>/i',.... return preg_replace('/<object><\/object>/i', '', $string);
  • About the style problem, with tinyMCE you can specifie where to find the css file for the UI and the content area, the extension could try to find these files in the style folder and if there are any, use the ones that come with extension.
  • the problem with that, Dinoboff, is the same one I explained above. It's not a problem to tell FCK to use the user's stylesheet in the editor area. The problem is that the DOM for the FCKeditor "editor" page which sits inside the iframe is totally different from the DOM inside a vanilla comment. The CSS will not apply unless you use a custom template for the editor page and recreate the vanilla comment DOM, which leads to two problems: 1) i don't know if it's possible at all to do that with FCK 2) if the user is using a different theme, it's possible that the DOM will be totally different from the standard vanilla DOM. so how do we tell FCK to use the proper template that matches the user's theme?
  • edited October 2006
    Dinoboff thanks. FCkeditor already has a flash linker. give it the youtube flash file and width and height and it generates the object code. I was reading up on youtube code and found out that if you want to use youtube on myspace. u only include the embed tags, not the object tag. plus google video gives u embed tags as well. So i guess i'll make it to allow only embed tags, which i'm assuming is less security prone cause it doesn't need param's thanks you Dinoboff have been a great help
This discussion has been closed.