zoukankan      html  css  js  c++  java
  • ckeditor使用

    参考:https://www.jb51.net/article/86500.htm
    https://www.cnblogs.com/Tirisfal/p/5548424.html
    #### 注意用标准版的没有背景色文字颜色等功能,所以配置了toolbar也不会显示此功能,需要下载full版本
    
    {% load staticfiles %}
    
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
    {#    <script type="text/javascript" src="/static/ckeditor/ckeditor.js"></script>#}
        <script type="text/javascript" src="{% static 'ckeditor/ckeditor.js' %}"></script>
        <script type="text/javascript" src="{% static 'ckeditor/config.js' %}"></script>
    {#    <script src="//cdn.ckeditor.com/4.4.6/full/ckeditor.js"></script>#}
    </head>
    
    <body>
    <form action="">
        <textarea id="TextArea1" cols="20" name="ss" rows="2" class="ckeditor"></textarea>
        
        <script type="text/javascript">
               
        CKEDITOR.replace('TextArea1',
        { toolbar:'Basic', height:300,1000 });
        //如果是在ASP.NET环境下用的服务器端控 件<TextBox>
        //CKEDITOR.replace('tbContent');
        //如 果<TextBox>控件在母版页中,要这样写
        //CKEDITOR.replace('<%=tbContent.ClientID.Replace("_","$") %>');
                  
    </script>
        <input type="submit">
    </form>
    </body>
    </html>
    
  • 相关阅读:
    1036 商务旅行
    4165 ​高精度求阶乘
    3117 高精度练习之乘法
    封装代理
    freemarker写select组件(三)
    VC双缓冲画图技术介绍
    JS学习十七天----工厂方法模式
    Struts2 全局结果集
    HDU 1730 Northcott Game
    C++ STL:vector
  • 原文地址:https://www.cnblogs.com/lajiao/p/9266063.html
Copyright © 2011-2022 走看看