zoukankan      html  css  js  c++  java
  • [Asp.Net Core]

    背景

    使用 Syncfusion / RichTextEditor 对录入后的信息进行展示:
    1. 希望内容高度自适应。
    2. 希望禁用原文中的超链接。

     

    实现

    <div class="form-group row">
        <div class="col-12">
            <label class="font-weight-bold">详细内容</label>
            <div>
                <ej-rte id="Extend" width="100%"allow-editing="false" show-toolbar="false" value="@Model.Extend"></ej-rte>
            </div>
        </div>
    </div>
    
    @section Scripts {
        <script>
            $(function () {
                /* Remove ALL Hyperlinks */
                $('#Extend_Iframe').contents().find('a').contents().unwrap();
                /* Refresh Iframe Heights */
                var iframeHeight = $('#Extend_Iframe').contents().height();
                $('#Extend_wrapper').height(iframeHeight + 24);
                $('#Extend_Iframe').height(iframeHeight + 12);
            });
        </script>
    }

    录入页面

    浏览页面

     参考资料

    https://help.syncfusion.com/aspnet-core/richtexteditor/working-with-content
    http://api.jquery.com/unwrap/

  • 相关阅读:
    csp-s模拟110
    csp-s模拟109
    留念
    csp-s 2019 游记
    HEOI2020
    CSP-S2019记
    堆积的$TIPS$
    低错复习
    倍增并查集
    4.26
  • 原文地址:https://www.cnblogs.com/jinzesudawei/p/7108718.html
Copyright © 2011-2022 走看看