Ckeditor 如何在验证前自动保存inputRichText内容

Ckeditor 如何在验证前自动保存inputRichText内容,ckeditor,validation,icefaces,fckeditor,icefaces-3,Ckeditor,Validation,Icefaces,Fckeditor,Icefaces 3,我在inputRichText组件(icefaces 3)方面遇到一些问题 此代码返回javascript错误,似乎无法找到我的工具栏配置,我的js路径是正确的(我确定) 虽然在我第一次提交表单时使用saveOnSubmit=“true”,但内容并没有保存,验证器将其内容捕获为空(显示validate msg),第二次提交表单时,它将通过验证,但我认为它在保存内容之前进行验证(而不是在保存之前和之后进行验证) 有人能帮我吗:(很抱歉这篇文章。我想我在配置文件中遗漏了一些东西,它现在可以正常工作了

我在inputRichText组件(icefaces 3)方面遇到一些问题

  • 此代码返回javascript错误,似乎无法找到我的工具栏配置,我的js路径是正确的(我确定)

  • 虽然在我第一次提交表单时使用saveOnSubmit=“true”,但内容并没有保存,验证器将其内容捕获为空(显示validate msg),第二次提交表单时,它将通过验证,但我认为它在保存内容之前进行验证(而不是在保存之前和之后进行验证)


  • 有人能帮我吗:(

    很抱歉这篇文章。我想我在配置文件中遗漏了一些东西,它现在可以正常工作了。 我的新配置文件:

    CKEDITOR.config.resize_maxWidth = "100%";
    CKEDITOR.config.tabSpaces = 5;
    CKEDITOR.config.defaultLanguage = 'vi';
    CKEDITOR.config.toolbar = 'MyToolbar';
    CKEDITOR.config.toolbar_MyToolbar =
        [
            [ 'Source','-','Save','Preview'],
            [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] ,
            [ 'Find','Replace','SelectAll' ] ,
            '/',                    
            [ 'Bold','Italic','Underline','-','Strike','Subscript','Superscript','-','RemoveFormat' ] ,
            [ 'NumberedList','BulletedList','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock' ] ,
            [ 'TextColor','BGColor' ],
            '/',        
            [ 'Format','Font','FontSize' ],
            ['Maximize', 'ShowBlocks' ] ,
            [ 'Link','Unlink'] , 
            [ 'Image','Smiley']             
        ];
    
    和xhtml

    <ice:inputRichText  id="noidung" value="#{CchcDmFeedbackController.objFeedback.fbNoidung}" required="true" requiredMessage="Vui lòng nhập nội dung" skin="kama" styleClass="editor" saveOnSubmit="true" toolbar="MyToolbar"  customConfigPath="/resources/js/CKConfig.js"/> 
    <h:message for="noidung"/>
    
    
    
    注: 我使用CKV3.5,在配置文件中不能使用组名,只是[]而不是{[]} 在xhtml文件中,customConfigPath必须是静态url

    CKEDITOR.config.resize_maxWidth = "100%";
    CKEDITOR.config.tabSpaces = 5;
    CKEDITOR.config.defaultLanguage = 'vi';
    CKEDITOR.config.toolbar = 'MyToolbar';
    CKEDITOR.config.toolbar_MyToolbar =
        [
            [ 'Source','-','Save','Preview'],
            [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] ,
            [ 'Find','Replace','SelectAll' ] ,
            '/',                    
            [ 'Bold','Italic','Underline','-','Strike','Subscript','Superscript','-','RemoveFormat' ] ,
            [ 'NumberedList','BulletedList','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock' ] ,
            [ 'TextColor','BGColor' ],
            '/',        
            [ 'Format','Font','FontSize' ],
            ['Maximize', 'ShowBlocks' ] ,
            [ 'Link','Unlink'] , 
            [ 'Image','Smiley']             
        ];
    
    <ice:inputRichText  id="noidung" value="#{CchcDmFeedbackController.objFeedback.fbNoidung}" required="true" requiredMessage="Vui lòng nhập nội dung" skin="kama" styleClass="editor" saveOnSubmit="true" toolbar="MyToolbar"  customConfigPath="/resources/js/CKConfig.js"/> 
    <h:message for="noidung"/>