2024年4月7日 星期日

[研究][ASP.NET] TinyMCE 7.0.0 WYSIWYG HTML Editor 試用

[研究][ASP.NET] TinyMCE 7.0.0 WYSIWYG HTML Editor 試用

2024-04-07, 2024-04-20 更新

Visual Studio 2019 + ASP.NET + WebForm ( WebApplication)

Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs"
    Inherits="WebApplication1.Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="scripts/tinymce/tinymce.min.js"></script>
    <script>
        tinymce.init({
            selector: '#TextBox1'
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine" 
            Rows="5" Columns="20"></asp:TextBox>
        <asp:Button ID="Button1" runat="server" Text="Button" />
    </form>
</body>
</html>



Upgrade 按鈕會跳到下面網址
https://www.tiny.cloud/tinymce-self-hosted-premium-features/?utm_campaign=self_hosted_upgrade_promo&utm_source=tiny&utm_medium=referral


********************************************************************************
TinyMCE 7.0.0 WYSIWYG HTML Editor 可以商業 免費使用 ?
ChatGPT
TinyMCE 7.0.0 是一款開源的富文本編輯器,它基於LGPL協議發布,這意味著你可以在商業專案中免費使用它。 LGPL授權讓你在自己的專案中使用和修改這個軟體,而不需要公開原始碼或以其他方式將你的程式碼也授權為開源。 所以,如果你打算將TinyMCE 7.0.0 整合到商業項目中,你可以放心使用而不必支付費用。
********************************************************************************
TinyMCE 7.0.0 WYSIWYG HTML Editor 可以商業 免費使用 ?
Copilot
TinyMCE 7.0.0 是一個功能豐富的所見即所得(WYSIWYG)HTML編輯器,允許用戶在友好的界面中創建格式化的內容。這個版本根據GPL第2版或更高版本進行授權123。如果您是自托管用戶,您可以選擇在GPL下使用它,或者通過Tiny驗證您的付費許可證。
********************************************************************************

顯示 Upgrade 按鈕以外所有按鈕 ( 就是不要顯示 menubar)
NuGet 安裝 TinyMEC 7.0.1

Default.aspx
<%@ Page Language="C#" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="WebApplication1.Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
 <script src="scripts/tinymce/tinymce.min.js"></script>
    <script>
        tinymce.init({
            selector: '#TextBox1',
            //toolbar: 'undo redo | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link unlink | image media | code',
            menubar: false // Hide the menu bar
        });
    </script>

</head>
<body>
      <form id="form1" runat="server">
        <asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine" 
            Rows="5" Columns="20"></asp:TextBox>
        <asp:Button ID="Button1" runat="server" Text="Button" />
    </form>
</body>
</html>






********************************************************************************

(完)

沒有留言:

張貼留言