FCK Editor

14 views
Skip to first unread message

Osmair Fuck

unread,
Mar 29, 2009, 5:20:12 PM3/29/09
to jque...@googlegroups.com, javasc...@yahoogrupos.com.br
Pessoal, estou com um problema que não entendo, ha algum tempo uns 4 meses atras consegui usar o fck editor num projeto na boa, criei a toolbar personalizada sem problemas, porem agora estou tentando usar em outro projeto e o peguei os mesmos arquivos e não consigo mais personalizar a toolbar, isso já esta me tirando do serio e já estou partindo para outro editor, alguem poderia me indicar algum novo editor que use o jquery, ou use outra biblioteca mas que não de problema pois tenho o formvalidation na pagina.

Abraços
 

--
Osmair Fuck
55+ (48) 8428-8998
Palhoça - SC - Brasil
MSN: of...@hotmail.com
E-mail: osma...@gmail.com
SKYPE: ofuck_

Pablo

unread,
Mar 29, 2009, 5:37:10 PM3/29/09
to jque...@googlegroups.com
duas coisas ow é cache ow se ta alterando no arquivo errado... fck é otimo

Vitor Amaral

unread,
Mar 29, 2009, 5:41:34 PM3/29/09
to jque...@googlegroups.com
concordo com o pablo,,,,fckeditor é otimo,,,,,,,,,
,
tem alguma coisinha errada aii,,,,,,
,
se der posta alguma parte do codigo,, q a gente da uma olhada p/ ti...
 

Date: Sun, 29 Mar 2009 18:37:10 -0300
Subject: [jquery-br] Re: FCK Editor
From: pablo...@gmail.com
To: jque...@googlegroups.com

Osmair Fuck

unread,
Mar 29, 2009, 5:43:49 PM3/29/09
to jque...@googlegroups.com
Pablo atualizo a pagina direto limpando o cache antes e o arquivo que estou editando é o fckconfig.js.

Estou usando ele com o php, inclusive estou tentando configurar atraves de um arquivo externo como fala no manual e não estou tendo sucesso.



2009/3/29 Pablo <pablo...@gmail.com>

duas coisas ow é cache ow se ta alterando no arquivo errado... fck é otimo


Osmair Fuck

unread,
Mar 29, 2009, 5:49:10 PM3/29/09
to jque...@googlegroups.com
essa é a pagina de inclusão de noticias

<?php

session_start();
//require("inc/config.php");
//require("/inc/banco.php");
require'../../inc/biblioteca.php';
require'../../jss/fckeditor/fckeditor.php';

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Cadastro de noticiass</title>
        <link rel="stylesheet" href="/css/cad_pat.css" type="text/css" media="screen" charset="utf-8" />
        <link rel="stylesheet" href="/css/jquery-calendar.css" type="text/css" media="screen" charset="utf-8" />
        <link rel="stylesheet" href="/css/form_validation.css" type="text/css" media="screen" charset="utf-8" />
        <style type="text/css">
        <!-- #status {
            display: inline;
        }
        -->
        </style>
        <script src="/frw/jquery-1.2.6.pack.js" type="text/javascript"></script>
        <script language="javascript" src="/jss/jquery.formvalidation.1.1.5.js"></script>
        <script language="javascript" src="/jss/jquery.MultiFile.js"></script>
        <script language="javascript" src="/jss/fckeditor/fckeditor.js"></script>
        <script>
             $(document).ready(function(){
                $('#cad_noticias').formValidation({
                    alias: 'name',
                    required: 'accept'
                });
            });
            $(function(){
                 $('.multi-pt').MultiFile({
                  accept:'gif|jpg', max:3, STRING: {
                   remove:'Remover',
                   selected:'Selecionado: $file',
                   denied:'Invalido arquivo de tipo $ext!',
                   duplicate:'Arquivo ja selecionado:\n$file!'
                  }
                 });
                });
        </script>
    </head>
    <body>
        <div id="foto">
            <?php echo '<img src="'.$lista['noticiasimagens_imagem'].'" width="150px"  height="200px" alt="Brasao" /></a>' ?>
           </div>
        <div id="formulario_cadastro">
        <form id="cad_noticias" action="cad_noticias.php" enctype="multipart/form-data" method="post" accept-charset="utf-8">
            <fieldset>
                <legend>
                    Cadastro de noticiass
                </legend>
                <label>
                    Titulo
                </label>
                <input type="text" value="<?php echo $lista[noticias_titulo];?>" accept="true" name="noticias_titulo" id="noticias_titulo" maxlength="200" size="55"/>
                <br/>
                <label>
                    Materia
                </label>
                <?php
                                    $materia = new FCKeditor("noticias_materia");
                                    $materia->BasePath    = "../../jss/fckeditor/";
                                    $materia->Config['AutoDetectLanguage']    = false ;
                                    $materia->Config['DefaultLanguage']        = 'pt-br' ;
                                    //$materia->Config['CustomConfigurationsPath']    = '/lphfconfig.js' ;
                                    //$materia->ToolbarSet = 'Default2';
                                    //$materia->Config['SkinPath'] = '../inc/fckeditor/editor/skins/office2003/' ;
                                    $materia->Height        = '280' ;
                                    $materia->Width        = '650' ;
                                    $materia->Value        = '' ;
                                    $materia->Create() ;
                                ?>
<!--
                <textarea name="noticias_materia" rows="20" cols="62" accept="true"><?php echo $lista[noticias_materia];?></textarea>
-->

                <br/>
                <label>
                    Fotos
                </label>
                <input type="file" value="<?php echo $lista[noticias_brasao];?>" name="noticias_foto[]" id="noticias_foto" class="multi-pt"/>
                <br/>
                <input type="hidden" value="<?php echo $lista[noticias_idpk];?>" name="noticias_idpk"/>
                <p>
                    <input type="submit" value="Continue" class="button" />
                </p>
            </fieldset>
        </form>
        </div>
        </body>
        </html>

esse é o fckeditor.js, só a parte que estou criando o toolbar

FCKConfig.ToolbarLocation = 'In' ;

FCKConfig.ToolbarSets["Default"] = [
    ['DocProps','-','Save','NewPage','Preview','-','Templates'],
    ['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'],
    ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
    ['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],
    '/',
    ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
    ['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv'],
    ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
    ['Link','Unlink','Anchor'],
    ['Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'],
    '/',
    ['Style','FontFormat','FontName','FontSize'],
    ['TextColor','BGColor'],
    ['FitWindow','ShowBlocks','-','About']        // No comma for the last row.
] ;

FCKConfig.ToolbarSets["Default2"] = [
    ['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'],
    ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
     '/',
    ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
    ['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv'],
    ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
    ['Link','Unlink','Anchor'],
    ['Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'],
    '/',
    ['Style','FontFormat','FontName','FontSize'],
    ['TextColor','BGColor'],
    ['FitWindow','ShowBlocks']     
] ;



FCKConfig.ToolbarSets["Basic"] = [
    ['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','-','About']
] ;

abraços


2009/3/29 Vitor Amaral <vitor_...@hotmail.com>

Osmair Fuck

unread,
Mar 30, 2009, 1:27:46 AM3/30/09
to jque...@googlegroups.com
ai pessoal, valeu as dicas, já descobri o erro, realmente era o cache, mesmo com o ctrl+shift+r ainda permanecia com o cache ativo. Resolvi colocando isso nas tag php:


    // Sempre modificado
    header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");

    // HTTP/1.1
    header("Cache-Control: no-store, no-cache, must-revalidate");
    header("Cache-Control: post-check=0, pre-check=0", false);

    // HTTP/1.0
    header("Pragma: no-cache");



2009/3/29 Osmair Fuck <osma...@gmail.com>

Juarez P. A. Filho

unread,
Mar 31, 2009, 10:26:57 PM3/31/09
to jque...@googlegroups.com
Ainda bem que foi resolvido seu problema :) De qualquer forma um outro
editor muito bacana é o http://www.wmd-editor.com/


--
Regards,
Juarez P. A. Filho
Front-End Developer and Web Consultant
http://juarezpaf.com
"The future belongs to those who believe in the beauty of their
dreams." Eleanor Roosevelt

Reply all
Reply to author
Forward
0 new messages