2

我在我的 CMS 页面上使用 tinymce 并面临需要验证(jquery)的问题。一切顺利,但是当我使用编辑器仅插入 date{DATE d/m/Y} 时。jquery 验证不会关闭。

我的意思是,如果只有日期存在,如果我在验证效果良好之后或之前给出空格,就会产生问题。但是为什么只有 Date{DATE d/m/Y} 存在时验证不起作用?

我应该怎么做才能解决这个问题?

tinyMCE.init({
                theme : "advanced",
                theme_advanced_toolbar_align : "left",
                height : "400px",
                mode: "exact",
                elements : "description",
                plugins : "autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,ibrowser",
                setup : function(ed){

                ed.onKeyUp.add(function (ed, event) {
                        tinymce.triggerSave();
                        $("#EditView#description").trigger({type: 'keyup', ctrlKey: event.ctrlKey, altKey: event.altKey, which: event.keyCode, event:eventObject });
                });
            },

                theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
                theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
                theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen,ibrowser",
                theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage", 
                theme_advanced_toolbar_location : "top",
                width: "100%",
                inline_styles : true,
                directionality : "ltr",
                entity_encoding: 'raw',
                cleanup_on_startup : true,
                strict_loading_mode : true,
                convert_urls : false,
                remove_redundant_brs : true,
                plugin_insertdate_dateFormat : '{DATE '+df+'}',
                content_css :cssurl+"/includes/style/style.css",
        });
4

1 回答 1

0

我猜你的验证机制没有考虑到 tinymce 不等于你表单中的文本区域或输入字段。但是 tinymce 会创建一个新的 iframe,在其中编辑编辑器内容。

于 2013-04-09T12:40:04.083 回答