当我们自己在_layouts下或者MOSS的应用程序池里的项目想使用MOSS自带的RichText Editor控件:      MOSS自带RTE 控件的使用

其实用户很简单,2步搞定:

  1. 复制脚本
    script>
  2. 填入脚本

        <span dir="ltr">
                
    <textarea name="comment" rows="6" cols="20" id="comment" title="说明" class="ms-long" dir="none"></textarea>
                
    <input name="comment_spSave" type="HIDDEN" id="comment_spSave" />
            
    </span>
        
    <script>if (browseris.ie5up && browseris.win32 && !IsAccessibilityFeatureEnabled()){RTE_ConvertTextAreaToRichEdit("comment"truefalse"""2052"nullnullnullnullnull,"Compatible""\u002f",null,null,false,null,null,null,null,null,null,true,null);}else{document.write("&nbsp;<br><SPAN class=ms-formdescription><a href='javascript:HelpWindowKey(\"nsrichtext\")'>请单击此处了解有关添加基本 HTML 格式的帮助。</a></SPAN>&nbsp;<br>");};</script>
        
    </span>
  3. 控制大小
        #comment
        {
            width
    : 356px;
        
    }
  4. 获取RTE: 变量strHtml中
     strHtml;
            var strBaseElementID = "comment";
            
    //var elemTextArea=RTE_GetEditorTextArea(strBaseElementID);
            var docEditor=RTE_GetEditorDocument(strBaseElementID);
            strHtml
    =docEditor.body.innerHTML;
  5. 更改样式:FullHtml
    );
  6. 使用示例: 信息反馈收集
  7. MOSS自带RTE 控件的使用
  8. 第二种方法最简单了:
     
              AllowExternalUrls="false" 
              AllowFonts
    ="true" 
              AllowReusableContent
    ="false" 
              AllowHeadings
    ="false"
              AllowHyperlinks
    ="false"
              AllowImages
    ="false"
              AllowLists
    ="false"
              AllowTables
    ="false"
              AllowTextMarkup
    ="false" 
              AllowHTMLSourceEditing
    ="false"
              DisalbeBasicFormattingButtons
    ="false"
              runat
    ="server"/>
     

相关文章:

  • 2021-12-15
  • 2021-09-13
  • 2022-02-01
  • 2022-12-23
  • 2022-12-23
  • 2021-07-23
  • 2021-08-17
  • 2021-11-17
猜你喜欢
  • 2021-09-25
  • 2021-08-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案