/*




*/
/*
# (C) Copyright 2006 Nuxeo SAS <http://nuxeo.com>
# Author:
# M.-A. Darche <madarche@nuxeo.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as published
# by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
#
# $Id: cpsschemas.js.dtml 49413 2006-10-06 15:36:05Z madarche $

CPSSchemas JavaScript functions.

*/

/**
 * Display an FCKeditor window.
 *
 * inputId is the original widget textarea id
 * parentPath and baseUrl are used to find FCKeditor resources, maybe this can
 * be simplified in the future.
 */
function displayFckEditor(inputId, parentPath, baseUrl) {
    // This is where the editor will save the finished HTML text
    var oFCKeditor = new FCKeditor(inputId);
    var pathUser = parentPath;
    oFCKeditor.BasePath = baseUrl;
    oFCKeditor.Config['CustomConfigurationsPath'] = 'fckconfig-cps.js';
    oFCKeditor.ToolbarSet = 'Semantic';
    oFCKeditor.Config['LinkBrowserURL'] = pathUser + '/fck_browse_files.html';
    oFCKeditor.Config['ImageBrowserURL'] = pathUser + '/fck_browse_images.html';
    oFCKeditor.Config['FlashBrowserURL'] = pathUser + '/fck_browse_files.html';
    oFCKeditor.Width = 610;
    oFCKeditor.Height = 410;
    // Here we replace the original widget textarea
    oFCKeditor.ReplaceTextarea();
    //oFCKeditor.Create();
}

