import"./pinia.js";import"./tinymce.js";import{E as l}from"./Editor.js";import"./plugin.js";import"./plugin2.js";import{R as s,E as g,a as u}from"./Editor2.js";import{M as y}from"./vue.js";const o={};o.methods={source(){return`
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
  <script src="https://cdn.staticfile.org/jquery/2.2.4/jquery.min.js"></script>
  <!-- <script src='./api/api.js'></script> -->
  
  <script src='/tinymce/tinymce.js'></script><!-- \u5FC5\u8981 -->
  <script src='/tinymce/tinymce-plugin.js'></script><!-- \u5FC5\u8981 -->

  <style>
    body{max-width: 1920px;width: 100%; margin: 0 auto;}
    header{}
    .header_logo{ display: inline-block;vertical-align: middle;}
    header > div{ display: block; text-align: center;}
   .demo,#showID{ margin-top:50px;}
   #showID{ padding: 20px;}
   #tinymce-app .tinymce-box {padding-bottom: 0px!important;}
   .tiny_color{ color:#344A85 ;text-shadow: 0 3px 5px #677285; display: inline-block;margin-right: -20px; vertical-align: middle;}
   .plugin_color { color: #43B984;text-shadow: 0 3px 5px #34435C;display: inline-block;margin-left: -23px; vertical-align: middle;}
   .text-center{ text-align: center;}
   .animated #logoSvgId{
    fill-opacity: 0.75
   }
   a{display: inline-block; padding: 20px;font-size: 20px; list-style: none; text-decoration: none;color: #333;}
   #logoSvgId{display: inline-block; vertical-align: middle;}
   .btn{ border-radius: 20px; outline: none; width: 300px;height: 60px; margin: 20px auto; display: block; background: #1488F5; text-align: center;line-height: 60px; font-size: 28px;letter-spacing: 2px; color: #dedede;}
  </style>
</head>

<body tp-page-height="498">
      <div class="demo">
        <div id="tinymce-app">
            <div class="tinymce-demo" style="color: #000;">
                <div class="tinymce-cnt" id="mytextarea">
                  <div id="fvContentID"><ol>
                    <li style="letter-spacing: 2px;"><span style="color: #2dc26b;"><span style="color: #000000;">\u4E0D\u77E5\u5982\u4F55\u4F7F\u7528\u7F16\u8F91\u6846\u53EF\u4EE5\u70B9\u51FB<img src="https://xwjywjb.obs.cn-southwest-2.myhuaweicloud.com/db/UploadFile/2020/11/13/fcd5cc64-aff6-4ded-8f14-6a98b66a2aea.png">\uFF08\u6216 Alt+0)\uFF0C\u67E5\u770B\u5E2E\u52A9-\u3010\u5FEB\u6377\u952E\u3011\u3010\u529F\u80FD\u4ECB\u7ECD\u3011\u3010\u64CD\u4F5C\u624B\u518C\u3011\u3010\u7591\u95EE\u89E3\u7B54\u3011\u3010\u53CD\u9988\u95EE\u9898\u3011 \u3002</span></span></li>
                    <li style="letter-spacing: 2px;"><span style="color: #3598db;">\u9F20\u6807\u60AC\u6D6E</span>\u5728<em>\u529F\u80FD\u56FE\u6807</em>\u4E0A\u53EF\u4E86\u89E3\u529F\u80FD\u540D\u79F0</li>
                    <li style="letter-spacing: 2px;"><span style="color: #e03e2d;">\u5982\u8FC7\u9700\u8981\u4FEE\u65392020\u5E7411\u6708\u4E4B\u524D\u7684\u65E7\u65B0\u95FB\uFF0C\u5EFA\u8BAE\u5148\u6E05\u9664\u683C\u5F0F&nbsp; \u6216&nbsp; \u4E00\u952E\u5E03\u5C40<img src="https://xwjywjb.obs.cn-southwest-2.myhuaweicloud.com/db/UploadFile/2020/11/13/e952a0d5-2d30-4d86-ae7d-e8fd5c4e7cc7.png">\uFF0C\u5C06\u65E7\u65B0\u95FB\u6837\u5F0F\u53BB\u6389\u91CD\u65B0\u6392\u7248</span></li>
                    <li style="letter-spacing: 2px;"><span style="color: #e03e2d;">\u82E5\u6587\u6863\u7F16\u8F91\u8C03\u6574\u8FC7\u7A0B\u4E2D\u53D1\u751F\u610F\u5916\u5173\u95ED\u3010\u5982\uFF1A\u767B\u5F55\u65F6\u95F4\u8FC7\u957F\u3011\uFF0C\u5E76\u4E14\u672A\u5B58\u4E3A\u8349\u7A3F \u53EF\u4EE5\u70B9\u51FB<img src="https://xwjywjb.obs.cn-southwest-2.myhuaweicloud.com/db/UploadFile/2020/12/25/9b1473d3-e399-43d9-86b1-a0cb5970d7d0.png">\uFF0C\u6062\u590D\u6587\u6863\u7F16\u8F91\u72B6\u6001\uFF081\u5C0F\u65F6\u4EE5\u5185\u7684\u6700\u8FD1\u72B6\u6001\uFF09</span></li>
                    <li style="letter-spacing: 2px;"><span style="color: #e03e2d;"><span id="attachment_mce_1" contenteditable="false"><img style="width: 30px;" src="https://api.hope55.com/Content/js/tinymce/plugins/attachment/icons/file_type_pdf2.svg" width="30px"><a href="https://xwjywjb.obs.cn-southwest-2.myhuaweicloud.com/db/UploadFile/2020/11/9/a7653b78-f186-4237-81fb-213aac317ebe.pdf" target="_blank" rel="noopener">\u65B0\u7F16\u8F91\u5668\u65B0\u95FB\u4E0A\u4F20\u64CD\u4F5C\u8BF4\u660E(1).pdf (1.04 M)</a></span> </span></li>
                  </ol></div>
                  <style> #fvContentID a{display:inline-block!important} #fvContentID .attachment>img{display:inline-block!important;max-width:30px!important;min-width:30px!important;}#fvContentID .attachment>a{display:contents!important;}</style>
                </div>
            </div>
        </div>
      </div>
  <script>
    function savefun(){
      $("#showID").html(tinymceConfig.getHtml())
    }

                var xhrOnProgress = function (fun) {
                xhrOnProgress.onprogress = fun;
                return function () {
                    var xhr = $.ajaxSettings.xhr();
                    if (typeof xhrOnProgress.onprogress !== 'function')
                        return xhr;
                    if (xhrOnProgress.onprogress && xhr.upload) {
                        xhr.upload.onprogress = xhrOnProgress.onprogress;
                    }
                    return xhr;
                }
            }
            var tinymceConfig= {
                tinyID: "mytextarea",//\u4F5C\u7528\u57DFID
                placeholder: '', //\u9ED8\u8BA4\u6587\u5B57
                infoHtml: $(this.tinyID).html(),//\u521D\u59CB\u5316\u5185\u5BB9
                GbaseUrl: '',//\u5168\u5C40baseUrl
                OMHtml: '<div style="height: 1500px;"><p><h2>\u64CD\u4F5C\u624B\u518C\uFF1A</h2></p></div><p>666</p>', //\u8BBE\u7F6E\u64CD\u4F5C\u624B\u518CHtml
                CPHtml: '',
            }
          tinymce.init({
                 selector: '#'+tinymceConfig.tinyID,
                 language:'zh_CN',
                 menubar:false,
                 branding: false,
                 min_height:400,
                 max_height: 700,
                //  baseURL: './'
                 plugins: ' print  axupimgs clearhtml  preview insertdatetime  attachment  searchreplace visualblocks autolink  layout fullscreen toc image upfile link media code codesample table charmap hr pagebreak  anchor advlist lists textpattern help emoticons autosave bdmap indent2em   axupimgs   letterspacing imagetools quickbars attachment wordcount autoresize  importword tpCollapse tpTabs tpButtons',
                 toolbar_groups: {
                         formatting: {
                             text: '\u6587\u5B57\u683C\u5F0F',
                             tooltip: 'Formatting',
                             items: 'bold italic underline | superscript subscript',
                         },
                         alignment: {
                             icon: 'align-left',
                             tooltip: 'alignment',
                             items: 'alignleft aligncenter alignright alignjustify',
                         }
                  },
                 toolbar: ['|code formatselect fontselect fontsizeselect forecolor backcolor bold italic underline strikethrough  link alignment indent2em outdent  indent lineheight letterspacing bullist numlist blockquote subscript superscript layout removeformat table image  axupimgs media upfile attachment  emoticons importword charmap  hr pagebreak  clearhtml  tpImportword codesample visualblocks insertdatetime  bdmap  quickbars  toc cut copy undo redo ltr rtl tpCollapse tpTabs tpButtons restoredraft  searchreplace fullscreen  help wordcount preview'],
                 table_style_by_css: true,
                 OperationManualHtml: '',
                 CommonProblemHtml: '',
                 fixed_toolbar_container:'#tinymce-app .toolbar',
                 custom_ui_selector: '#tinymce-app',
                 placeholder:''+tinymceConfig.placeholder,
                 file_picker_types: 'media',
                 powerpaste_word_import: "clean", // \u662F\u5426\u4FDD\u7559word\u7C98\u8D34\u6837\u5F0F  clean | merge 
                 powerpaste_html_import: 'clean', // propmt, merge, clean
                 powerpaste_allow_local_images: true,//
                 powerpaste_keep_unsupported_src:true,
                 paste_data_images: true,
                 toolbar_sticky: false,
                skeletonScreen: true,
                 autosave_ask_before_unload: false,
                 fontsize_formats: '12px 14px 16px 18px 24px 36px 48px 56px 72px',
                 font_formats: '\u5FAE\u8F6F\u96C5\u9ED1=Microsoft YaHei,Helvetica Neue,PingFang SC,sans-serif;\u82F9\u679C\u82F9\u65B9=PingFang SC,Microsoft YaHei,sans-serif;\u5B8B\u4F53=simsun,serif;\u4EFF\u5B8B\u4F53=FangSong,serif;\u9ED1\u4F53=SimHei,sans-serif;Arial=arial,helvetica,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats;',
                 images_upload_base_path: '',
               
                 images_upload_handler: function (blobInfo, succFun, failFun) {
                    var file = blobInfo.blob();
                    var reader = new FileReader();
                    reader.onload = function(e){
                     succFun(e.target.result)
                    }
                   reader.readAsDataURL(file)
                 },
                 file_picker_callback: function (succFun, value, meta) { //\u81EA\u5B9A\u4E49\u6587\u4EF6\u4E0A\u4F20\u51FD\u6570 
                    var filetype = '.pdf, .txt, .zip, .rar, .7z, .doc, .docx, .xls, .xlsx, .ppt, .pptx, .mp3, .mp4';
                    var input = document.createElement('input');
                    input.setAttribute('type', 'file');
                    input.setAttribute('accept', filetype);
                    input.click();
                    input.onchange = function () {
                        var file = this.files[0];
                        var data = new FormData();
                         data.append("file", file);
                        $.ajax({
                            data: data,
                            type: 'GET',
                            url: './api/file.json',
                            header:{'Content-Type':'multipart/form-data'},
                            cache: false,
                            contentType: false,
                            processData: false,
                            dataType: 'json',
                            xhr: xhrOnProgress(function (e) {
                                const percent = (e.loaded / e.total * 100 | 0) + '%';//\u8BA1\u7B97\u767E\u5206\u6BD4
                                // console.log(percent);
                                progressCallback(percent);
                  
                            }),
                        }).then(function (data) {
                            if ( data.code== 200) {
                                succFun(data.data,{ text: data.data });
                            }
                        }).fail(function (error) {
                            failFun('\u4E0A\u4F20\u5931\u8D25:' + error.message)
                        });
                    }
                 },
                 file_callback: function (file, succFun) { //\u6587\u4EF6\u4E0A\u4F20  file:\u6587\u4EF6\u5BF9\u8C61 succFun(url|string,obj) \u6210\u529F\u56DE\u8C03
                    var data = new FormData();
                    data.append("file", file);
                    $.ajax({
                        data: data,
                        type: 'GET',
                        url: '/tinymce/api/file.json',
                        cache: false,
                        contentType: false,
                        processData: false,
                        header:{'Content-Type':'multipart/form-data'},
                        dataType: 'json',
                        xhr: xhrOnProgress(function (e) {
                            const percent = (e.loaded / e.total * 100 | 0) + '%';//\u8BA1\u7B97\u767E\u5206\u6BD4
                            progressCallback(percent);
                        }),
                    }).then(function (data) {
                        if ( data.code== 200) {
                            succFun(data.data,{text: file.name});
                        } 
                    }).fail(function (error) {
                        // failFun('\u4E0A\u4F20\u5931\u8D25:' + error.message)
                    });
                 },
                 tp_attachment_max_size: 5009715200,
                //  attachment_style: '.attachment>img{display:inline-block!important;max-width:30px!important;}',
                 tp_attachment_assets_path: '/tinymce/plugins/attachment/icons',
                
              
                 init_instance_callback: function(editor){
                     $('#tinymce-app').fadeIn(1000);
                  //    editor.execCommand('selectAll');
                  //    editor.selection.getRng().collapse(false);
                  //    editor.focus();
                 }
          }).then(function(res){
                 tinymce.feedBackIframeUrl ='/tinymce/plugins/help/docBox.html'; //\u53CD\u9988\u94FE\u63A5
             });
  </script>
</body>
</html>

html
`},sourceCode(){return''}};o.template=` `;const p={name:"domeVue3",components:{TinymceVue:l},data(){return{content:"Tinymce-Plugin",tinymceOptions:{min_height:200,max_height:700,skeletonScreen:!0,base_url:"/tinymce",plugins:"tp code tpIndent2em autoresize tpCollapse tpTabs tpButtons tpImportword preview",toolbar:["|code tpIndent2em tpCollapse tpTabs tpButtons tpImportword | Preview"]}}}};p.methods?p.methods.source=function(){return`
<template>
<div>
 <h1>\u63D2\u4EF6demo\u5C55\u793A\u533A\u57DF</h1>
  <div class="vueDemo">
    <tinymce-vue v-model="content" :init="tinymceOptions" ></tinymce-vue>
  </div>
  <div  v-html="content"></div>
</div>
</template>

<script>
import tinymce from "tinymce";
import "tinymce-plugin";
import TinymceVue from "@tinymce-plugin/tinymce-vue";
import "tinymce-plugin/plugins/tpIndent2em/plugin.js";
import "tinymce-plugin/plugins/tpImportword/plugin.js";
export default{
name: 'domeVue3',
components: { TinymceVue },
data(){
    return {
        content: 'Tinymce-Plugin',
        tinymceOptions:{
                // custom_elements: 'tp-collapse',
                min_height: 200,
                max_height: 700,
                skeletonScreen: true,
                base_url:'/tinymce',
                plugins: 'tp code  tpIndent2em autoresize tpCollapse tpTabs tpButtons tpImportword preview',
                toolbar: ['|code tpIndent2em tpCollapse tpTabs tpButtons tpImportword | Preview'],
             
        }
    }
  }
}
</script>
vue
`}:p.methods={source(){return`
<template>
<div>
 <h1>\u63D2\u4EF6demo\u5C55\u793A\u533A\u57DF</h1>
  <div class="vueDemo">
    <tinymce-vue v-model="content" :init="tinymceOptions" ></tinymce-vue>
  </div>
  <div  v-html="content"></div>
</div>
</template>

<script>
import tinymce from "tinymce";
import "tinymce-plugin";
import TinymceVue from "@tinymce-plugin/tinymce-vue";
import "tinymce-plugin/plugins/tpIndent2em/plugin.js";
import "tinymce-plugin/plugins/tpImportword/plugin.js";
export default{
name: 'domeVue3',
components: { TinymceVue },
data(){
    return {
        content: 'Tinymce-Plugin',
        tinymceOptions:{
                // custom_elements: 'tp-collapse',
                min_height: 200,
                max_height: 700,
                skeletonScreen: true,
                base_url:'/tinymce',
                plugins: 'tp code  tpIndent2em autoresize tpCollapse tpTabs tpButtons tpImportword preview',
                toolbar: ['|code tpIndent2em tpCollapse tpTabs tpButtons tpImportword | Preview'],
             
        }
    }
  }
}
</script>
vue
`}};p.template=` ' `;const a={};a.methods?(a.methods.source=function(){return`
<template>
<div>
 <h1>\u63D2\u4EF6demo\u5C55\u793A\u533A\u57DF</h1>
  <div class="vueDemo">
    <tinymce-vue v-model="content" :init="tinymceOptions" ></tinymce-vue>
  </div>
  <div v-html="content"></div>
</div>
</template>

<script>
import tinymce from "tinymce";
import "tinymce-plugin";
import "tinymce-plugin/plugins/tpIndent2em/plugin.js";
import "tinymce-plugin/plugins/tpImportword/plugin.js";
import TinymceVue from "@tinymce-plugin/tinymce-vue";
export default{
name: 'domeVue2',
components: { TinymceVue },
data(){
    return {
        content: 'fivesdsdsd',
        tinymceOptions:{
                min_height: 200,
                max_height: 700,
                base_url:'/tinymce',
                plugins: 'tp code  tpIndent2em autoresize tpCollapse tpTabs tpButtons image preview',
                toolbar: ['code tpIndent2em tpCollapse tpTabs tpButtons Preview'],
                skeletonScreen: true,
             
        }
    }
  }
}
</script>
vue
`},a.methods.template=function(){return`

\u63D2\u4EF6demo\u5C55\u793A\u533A\u57DF

`},a.methods.sourceCode=function(){return{name:"domeVue2",components:{TinymceVue:l},data:function(){return{content:"fivesdsdsd",tinymceOptions:{min_height:200,max_height:700,base_url:"/tinymce",plugins:"tp code tpIndent2em autoresize tpCollapse tpTabs tpButtons image preview",toolbar:["code tpIndent2em tpCollapse tpTabs tpButtons Preview"],skeletonScreen:!0}}}}}):a.methods={template(){return`

\u63D2\u4EF6demo\u5C55\u793A\u533A\u57DF

`},sourceCode(){return{name:"domeVue2",components:{TinymceVue:l},data:function(){return{content:"fivesdsdsd",tinymceOptions:{min_height:200,max_height:700,base_url:"/tinymce",plugins:"tp code tpIndent2em autoresize tpCollapse tpTabs tpButtons image preview",toolbar:["code tpIndent2em tpCollapse tpTabs tpButtons Preview"],skeletonScreen:!0}}}}},source(){return`
<template>
<div>
 <h1>\u63D2\u4EF6demo\u5C55\u793A\u533A\u57DF</h1>
  <div class="vueDemo">
    <tinymce-vue v-model="content" :init="tinymceOptions" ></tinymce-vue>
  </div>
  <div v-html="content"></div>
</div>
</template>

<script>
import tinymce from "tinymce";
import "tinymce-plugin";
import "tinymce-plugin/plugins/tpIndent2em/plugin.js";
import "tinymce-plugin/plugins/tpImportword/plugin.js";
import TinymceVue from "@tinymce-plugin/tinymce-vue";
export default{
name: 'domeVue2',
components: { TinymceVue },
data(){
    return {
        content: 'fivesdsdsd',
        tinymceOptions:{
                min_height: 200,
                max_height: 700,
                base_url:'/tinymce',
                plugins: 'tp code  tpIndent2em autoresize tpCollapse tpTabs tpButtons image preview',
                toolbar: ['code tpIndent2em tpCollapse tpTabs tpButtons Preview'],
                skeletonScreen: true,
             
        }
    }
  }
}
</script>
vue
`}};a.template=` `;const h={};h.methods={source(){return`
<script>
import React from 'react';
import ReactDOM from 'react-dom';
import tinymce from "tinymce";
import "tinymce-plugin";
import "tinymce-plugin/plugins/tpIndent2em/plugin.js";
import "tinymce-plugin/plugins/tpImportword/plugin.js";
import { Editor } from '@tinymce/tinymce-react';

     class ReactDemo extends React.Component{
       constructor(props) {
           super(props);
           this.state = { reactDemoInitialValue: "<p>\u8FD9\u662F\u4E00\u4E2AREactDemo</p>"};
           this.reactDemoInit = {
                    min_height: 220,
                    base_url:'/tinymce',
                    branding: false,
                    language:'zh_CN',
                    menubar: false,
                    skeletonScreen: true,
                    plugins: ['advlist autolink lists link image charmap print preview anchor', 'searchreplace visualblocks code fullscreen tpIndent2em autoresize tpCollapse tpTabs tpButtons', 'insertdatetime media table paste code help wordcount tpImportword'],
                    toolbar: 'undo redo tpIndent2em autoresize tpCollapse tpTabs tpButtons tpImportword | formatselect image | ' + 'bold italic backcolor | alignleft aligncenter ' + 'alignright alignjustify | bullist numlist outdent indent | ' + 'removeformat | help',
                    content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
             };
       this.handleChange = (data)=>{
              this.setState({reactDemoInitialValue: data})
        }
      }
      render(){
        return (
           <div>
            <h1>tinymce demo2</h1>
            <div>
            <Editor initialValue={this.state.reactDemoInitialValue} init={this.reactDemoInit} onEditorChange={this.handleChange} />
            </div>
            <div dangerouslySetInnerHTML={{__html: this.state.reactDemoInitialValue }} ></div>
          </div>
          );
      }
    }

   ReactDOM.render(<ReactDemo />, document.getElementById('ReactRootID'));
</script>
html
`},sourceCode(i){class e extends s.Component{constructor(c){super(c),this.state={reactDemoInitialValue:"

\u8FD9\u662F\u4E00\u4E2AREactDemo

"},this.reactDemoInit={min_height:220,base_url:"/tinymce",branding:!1,language:"zh_CN",menubar:!1,skeletonScreen:!0,plugins:["advlist autolink lists link image charmap print preview anchor","searchreplace visualblocks code fullscreen tpIndent2em autoresize tpCollapse tpTabs tpButtons","insertdatetime media table paste code help wordcount tpImportword"],toolbar:"undo redo tpIndent2em autoresize tpCollapse tpTabs tpButtons tpImportword | formatselect image | bold italic backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help",content_style:"body { font-family:Helvetica,Arial,sans-serif; font-size:14px }"},this.handleChange=r=>{this.setState({reactDemoInitialValue:r})}}render(){return s.createElement("div",null,s.createElement("h1",null,"tinymce demo2"),s.createElement("div",null,s.createElement(g,{initialValue:this.state.reactDemoInitialValue,init:this.reactDemoInit,onEditorChange:this.handleChange})),s.createElement("div",{dangerouslySetInnerHTML:{__html:this.state.reactDemoInitialValue}}))}}return u.render(s.createElement(e,null),i)}};h.template=` `;const j={};j.methods={source(){return`
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
  <script src="https://cdn.staticfile.org/jquery/2.2.4/jquery.min.js"></script>
  <!-- <script src='./api/api.js'></script> -->
  
  <script src='/tinymce/tinymce.js'></script><!-- \u5FC5\u8981 -->
  <script src='/tinymce/tinymce-plugin.js'></script><!-- \u5FC5\u8981 -->

  <style>
    body{max-width: 1920px;width: 100%; margin: 0 auto;}
    header{}
    .header_logo{ display: inline-block;vertical-align: middle;}
    header > div{ display: block; text-align: center;}
   .demo,#showID{ margin-top:50px;}
   #showID{ padding: 20px;}
   #tinymce-app .tinymce-box {padding-bottom: 0px!important;}
   .tiny_color{ color:#344A85 ;text-shadow: 0 3px 5px #677285; display: inline-block;margin-right: -20px; vertical-align: middle;}
   .plugin_color { color: #43B984;text-shadow: 0 3px 5px #34435C;display: inline-block;margin-left: -23px; vertical-align: middle;}
   .text-center{ text-align: center;}
   .animated #logoSvgId{
    fill-opacity: 0.75
   }
   a{display: inline-block; padding: 20px;font-size: 20px; list-style: none; text-decoration: none;color: #333;}
   #logoSvgId{display: inline-block; vertical-align: middle;}
   .btn{ border-radius: 20px; outline: none; width: 300px;height: 60px; margin: 20px auto; display: block; background: #1488F5; text-align: center;line-height: 60px; font-size: 28px;letter-spacing: 2px; color: #dedede;}
  </style>
</head>

<body tp-page-height="478">
      <div class="demo">
        <div id="tinymce-app">
            <div class="tinymce-demo" style="color: #000;">
                <div class="tinymce-cnt" id="mytextarea">
                  <div id="fvContentID"><ol>
                    <li style="letter-spacing: 2px;"><span style="color: #2dc26b;"><span style="color: #000000;">\u4E0D\u77E5\u5982\u4F55\u4F7F\u7528\u7F16\u8F91\u6846\u53EF\u4EE5\u70B9\u51FB<img src="https://xwjywjb.obs.cn-southwest-2.myhuaweicloud.com/db/UploadFile/2020/11/13/fcd5cc64-aff6-4ded-8f14-6a98b66a2aea.png">\uFF08\u6216 Alt+0)\uFF0C\u67E5\u770B\u5E2E\u52A9-\u3010\u5FEB\u6377\u952E\u3011\u3010\u529F\u80FD\u4ECB\u7ECD\u3011\u3010\u64CD\u4F5C\u624B\u518C\u3011\u3010\u7591\u95EE\u89E3\u7B54\u3011\u3010\u53CD\u9988\u95EE\u9898\u3011 \u3002</span></span></li>
                    <li style="letter-spacing: 2px;"><span style="color: #3598db;">\u9F20\u6807\u60AC\u6D6E</span>\u5728<em>\u529F\u80FD\u56FE\u6807</em>\u4E0A\u53EF\u4E86\u89E3\u529F\u80FD\u540D\u79F0</li>
                    <li style="letter-spacing: 2px;"><span style="color: #e03e2d;">\u5982\u8FC7\u9700\u8981\u4FEE\u65392020\u5E7411\u6708\u4E4B\u524D\u7684\u65E7\u65B0\u95FB\uFF0C\u5EFA\u8BAE\u5148\u6E05\u9664\u683C\u5F0F&nbsp; \u6216&nbsp; \u4E00\u952E\u5E03\u5C40<img src="https://xwjywjb.obs.cn-southwest-2.myhuaweicloud.com/db/UploadFile/2020/11/13/e952a0d5-2d30-4d86-ae7d-e8fd5c4e7cc7.png">\uFF0C\u5C06\u65E7\u65B0\u95FB\u6837\u5F0F\u53BB\u6389\u91CD\u65B0\u6392\u7248</span></li>
                    <li style="letter-spacing: 2px;"><span style="color: #e03e2d;">\u82E5\u6587\u6863\u7F16\u8F91\u8C03\u6574\u8FC7\u7A0B\u4E2D\u53D1\u751F\u610F\u5916\u5173\u95ED\u3010\u5982\uFF1A\u767B\u5F55\u65F6\u95F4\u8FC7\u957F\u3011\uFF0C\u5E76\u4E14\u672A\u5B58\u4E3A\u8349\u7A3F \u53EF\u4EE5\u70B9\u51FB<img src="https://xwjywjb.obs.cn-southwest-2.myhuaweicloud.com/db/UploadFile/2020/12/25/9b1473d3-e399-43d9-86b1-a0cb5970d7d0.png">\uFF0C\u6062\u590D\u6587\u6863\u7F16\u8F91\u72B6\u6001\uFF081\u5C0F\u65F6\u4EE5\u5185\u7684\u6700\u8FD1\u72B6\u6001\uFF09</span></li>
                    <li style="letter-spacing: 2px;"><span style="color: #e03e2d;"><span id="attachment_mce_1" contenteditable="false"><img style="width: 30px;" src="https://api.hope55.com/Content/js/tinymce/plugins/attachment/icons/file_type_pdf2.svg" width="30px"><a href="https://xwjywjb.obs.cn-southwest-2.myhuaweicloud.com/db/UploadFile/2020/11/9/a7653b78-f186-4237-81fb-213aac317ebe.pdf" target="_blank" rel="noopener">\u65B0\u7F16\u8F91\u5668\u65B0\u95FB\u4E0A\u4F20\u64CD\u4F5C\u8BF4\u660E(1).pdf (1.04 M)</a></span> </span></li>
                  </ol></div>
                  <style> #fvContentID a{display:inline-block!important} #fvContentID .attachment>img{display:inline-block!important;max-width:30px!important;min-width:30px!important;}#fvContentID .attachment>a{display:contents!important;}</style>
                </div>
            </div>
        </div>
      </div>
  <script>
    function savefun(){
      $("#showID").html(tinymceConfig.getHtml())
    }

                var xhrOnProgress = function (fun) {
                xhrOnProgress.onprogress = fun;
                return function () {
                    var xhr = $.ajaxSettings.xhr();
                    if (typeof xhrOnProgress.onprogress !== 'function')
                        return xhr;
                    if (xhrOnProgress.onprogress && xhr.upload) {
                        xhr.upload.onprogress = xhrOnProgress.onprogress;
                    }
                    return xhr;
                }
            }
            var tinymceConfig= {
                tinyID: "mytextarea",//\u4F5C\u7528\u57DFID
                placeholder: '', //\u9ED8\u8BA4\u6587\u5B57
                infoHtml: $(this.tinyID).html(),//\u521D\u59CB\u5316\u5185\u5BB9
                GbaseUrl: '',//\u5168\u5C40baseUrl
                OMHtml: '<div style="height: 1500px;"><p><h2>\u64CD\u4F5C\u624B\u518C\uFF1A</h2></p></div><p>666</p>', //\u8BBE\u7F6E\u64CD\u4F5C\u624B\u518CHtml
                CPHtml: '',
            }
          tinymce.init({
                 selector: '#'+tinymceConfig.tinyID,
                 language:'zh_CN',
                 menubar:false,
                 branding: false,
                 min_height:400,
                 max_height: 700,
                //  baseURL: './'
                 plugins: ' print  axupimgs clearhtml  preview insertdatetime  attachment  searchreplace visualblocks autolink  layout fullscreen toc image upfile link media code codesample table charmap hr pagebreak  anchor advlist lists textpattern help emoticons autosave bdmap indent2em   axupimgs   letterspacing imagetools quickbars attachment wordcount autoresize  importword tpCollapse tpTabs tpButtons',
                 toolbar_groups: {
                         formatting: {
                             text: '\u6587\u5B57\u683C\u5F0F',
                             tooltip: 'Formatting',
                             items: 'bold italic underline | superscript subscript',
                         },
                         alignment: {
                             icon: 'align-left',
                             tooltip: 'alignment',
                             items: 'alignleft aligncenter alignright alignjustify',
                         }
                  },
                 toolbar: ['|code formatselect fontselect fontsizeselect forecolor backcolor bold italic underline strikethrough  link alignment indent2em outdent  indent lineheight letterspacing bullist numlist blockquote subscript superscript layout removeformat table image  axupimgs media upfile attachment  emoticons importword charmap  hr pagebreak  clearhtml  tpImportword codesample visualblocks insertdatetime  bdmap  quickbars  toc cut copy undo redo ltr rtl tpCollapse tpTabs tpButtons restoredraft  searchreplace fullscreen  help wordcount preview'],
                 table_style_by_css: true,
                 OperationManualHtml: '',
                 CommonProblemHtml: '',
                 fixed_toolbar_container:'#tinymce-app .toolbar',
                 custom_ui_selector: '#tinymce-app',
                 placeholder:''+tinymceConfig.placeholder,
                 file_picker_types: 'media',
                 powerpaste_word_import: "clean", // \u662F\u5426\u4FDD\u7559word\u7C98\u8D34\u6837\u5F0F  clean | merge 
                 powerpaste_html_import: 'clean', // propmt, merge, clean
                 powerpaste_allow_local_images: true,//
                 powerpaste_keep_unsupported_src:true,
                 paste_data_images: true,
                 toolbar_sticky: false,
                skeletonScreen: true,
                 autosave_ask_before_unload: false,
                 fontsize_formats: '12px 14px 16px 18px 24px 36px 48px 56px 72px',
                 font_formats: '\u5FAE\u8F6F\u96C5\u9ED1=Microsoft YaHei,Helvetica Neue,PingFang SC,sans-serif;\u82F9\u679C\u82F9\u65B9=PingFang SC,Microsoft YaHei,sans-serif;\u5B8B\u4F53=simsun,serif;\u4EFF\u5B8B\u4F53=FangSong,serif;\u9ED1\u4F53=SimHei,sans-serif;Arial=arial,helvetica,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats;',
                 images_upload_base_path: '',
               
                 images_upload_handler: function (blobInfo, succFun, failFun) {
                    var file = blobInfo.blob();
                    var reader = new FileReader();
                    reader.onload = function(e){
                     succFun(e.target.result)
                    }
                   reader.readAsDataURL(file)
                 },
                 file_picker_callback: function (succFun, value, meta) { //\u81EA\u5B9A\u4E49\u6587\u4EF6\u4E0A\u4F20\u51FD\u6570 
                    var filetype = '.pdf, .txt, .zip, .rar, .7z, .doc, .docx, .xls, .xlsx, .ppt, .pptx, .mp3, .mp4';
                    var input = document.createElement('input');
                    input.setAttribute('type', 'file');
                    input.setAttribute('accept', filetype);
                    input.click();
                    input.onchange = function () {
                        var file = this.files[0];
                        var data = new FormData();
                         data.append("file", file);
                        $.ajax({
                            data: data,
                            type: 'GET',
                            url: './api/file.json',
                            header:{'Content-Type':'multipart/form-data'},
                            cache: false,
                            contentType: false,
                            processData: false,
                            dataType: 'json',
                            xhr: xhrOnProgress(function (e) {
                                const percent = (e.loaded / e.total * 100 | 0) + '%';//\u8BA1\u7B97\u767E\u5206\u6BD4
                                // console.log(percent);
                                progressCallback(percent);
                  
                            }),
                        }).then(function (data) {
                            if ( data.code== 200) {
                                succFun(data.data,{ text: data.data });
                            }
                        }).fail(function (error) {
                            failFun('\u4E0A\u4F20\u5931\u8D25:' + error.message)
                        });
                    }
                 },
                 file_callback: function (file, succFun) { //\u6587\u4EF6\u4E0A\u4F20  file:\u6587\u4EF6\u5BF9\u8C61 succFun(url|string,obj) \u6210\u529F\u56DE\u8C03
                    var data = new FormData();
                    data.append("file", file);
                    $.ajax({
                        data: data,
                        type: 'GET',
                        url: '/tinymce/api/file.json',
                        cache: false,
                        contentType: false,
                        processData: false,
                        header:{'Content-Type':'multipart/form-data'},
                        dataType: 'json',
                        xhr: xhrOnProgress(function (e) {
                            const percent = (e.loaded / e.total * 100 | 0) + '%';//\u8BA1\u7B97\u767E\u5206\u6BD4
                            progressCallback(percent);
                        }),
                    }).then(function (data) {
                        if ( data.code== 200) {
                            succFun(data.data,{text: file.name});
                        } 
                    }).fail(function (error) {
                        // failFun('\u4E0A\u4F20\u5931\u8D25:' + error.message)
                    });
                 },
                 tp_attachment_max_size: 5009715200,
                //  attachment_style: '.attachment>img{display:inline-block!important;max-width:30px!important;}',
                 tp_attachment_assets_path: '/tinymce/plugins/attachment/icons',
                
              
                 init_instance_callback: function(editor){
                     $('#tinymce-app').fadeIn(1000);
                  //    editor.execCommand('selectAll');
                  //    editor.selection.getRng().collapse(false);
                  //    editor.focus();
                 }
          }).then(function(res){
                 tinymce.feedBackIframeUrl ='/tinymce/plugins/help/docBox.html'; //\u53CD\u9988\u94FE\u63A5
             });
  </script>
</body>
</html>

html
`},sourceCode(){return''}};j.template=` `;const t={name:"domeVue3",components:{TinymceVue:l},data(){return{content:"Tinymce-Plugin",tinymceOptions:{min_height:200,max_height:700,skeletonScreen:!0,base_url:"/tinymce",plugins:"code tpIndent2em autoresize tpCollapse tpTabs tpButtons tpImportword preview",toolbar:["|code tpIndent2em tpCollapse tpTabs tpButtons tpImportword | Preview"]}}}};t.methods?t.methods.source=function(){return`
<template>
<div>
 <h1>\u63D2\u4EF6demo\u5C55\u793A\u533A\u57DF</h1>
  <div class="vueDemo">
    <tinymce-vue v-model="content" :init="tinymceOptions" ></tinymce-vue>
  </div>
  <div  v-html="content"></div>
</div>
</template>

<script>
import tinymce from "tinymce";
import "tinymce-plugin";
import TinymceVue from "@tinymce-plugin/tinymce-vue";
import "tinymce-plugin/plugins/tpIndent2em/plugin.js";
import "tinymce-plugin/plugins/tpImportword/plugin.js";
export default{
name: 'domeVue3',
components: { TinymceVue },
data(){
    return {
        content: 'Tinymce-Plugin',
        tinymceOptions:{
                min_height: 200,
                max_height: 700,
                skeletonScreen: true,
                base_url:'/tinymce',
                plugins: 'code  tpIndent2em autoresize tpCollapse tpTabs tpButtons tpImportword preview',
                toolbar: ['|code tpIndent2em tpCollapse tpTabs tpButtons tpImportword | Preview'],
             
        }
    }
  }
}
</script>
vue
`}:t.methods={source(){return`
<template>
<div>
 <h1>\u63D2\u4EF6demo\u5C55\u793A\u533A\u57DF</h1>
  <div class="vueDemo">
    <tinymce-vue v-model="content" :init="tinymceOptions" ></tinymce-vue>
  </div>
  <div  v-html="content"></div>
</div>
</template>

<script>
import tinymce from "tinymce";
import "tinymce-plugin";
import TinymceVue from "@tinymce-plugin/tinymce-vue";
import "tinymce-plugin/plugins/tpIndent2em/plugin.js";
import "tinymce-plugin/plugins/tpImportword/plugin.js";
export default{
name: 'domeVue3',
components: { TinymceVue },
data(){
    return {
        content: 'Tinymce-Plugin',
        tinymceOptions:{
                min_height: 200,
                max_height: 700,
                skeletonScreen: true,
                base_url:'/tinymce',
                plugins: 'code  tpIndent2em autoresize tpCollapse tpTabs tpButtons tpImportword preview',
                toolbar: ['|code tpIndent2em tpCollapse tpTabs tpButtons tpImportword | Preview'],
             
        }
    }
  }
}
</script>
vue
`}};t.template=` ' `;const n={};n.methods?(n.methods.source=function(){return`
<template>
<div>
 <h1>\u63D2\u4EF6demo\u5C55\u793A\u533A\u57DF</h1>
  <div class="vueDemo">
    <tinymce-vue v-model="content" :init="tinymceOptions" ></tinymce-vue>
  </div>
  <div v-html="content"></div>
</div>
</template>

<script>
import "tinymce-plugin";
import "tinymce-plugin/plugins/tpIndent2em/plugin.js";
import "tinymce-plugin/plugins/tpImportword/plugin.js";
import TinymceVue from "@tinymce-plugin/tinymce-vue";
export default{
name: 'domeVue2',
components: { TinymceVue },
data(){
    return {
        content: 'Tinymce-plugin',
        tinymceOptions:{
                min_height: 200,
                max_height: 700,
                base_url:'/tinymce',
                plugins: 'tp code  tpIndent2em autoresize tpCollapse tpTabs tpButtons image preview',
                toolbar: ['code tpIndent2em tpCollapse tpTabs tpButtons Preview'],
                skeletonScreen: true,
             
        }
    }
  }
}
</script>
vue
`},n.methods.template=function(){return`

\u63D2\u4EF6demo\u5C55\u793A\u533A\u57DF

`},n.methods.sourceCode=function(){return{name:"domeVue2",components:{TinymceVue:l},data:function(){return{content:"Tinymce-plugin",tinymceOptions:{min_height:200,max_height:700,base_url:"/tinymce",plugins:"tp code tpIndent2em autoresize tpCollapse tpTabs tpButtons image preview",toolbar:["code tpIndent2em tpCollapse tpTabs tpButtons Preview"],skeletonScreen:!0}}}}}):n.methods={template(){return`

\u63D2\u4EF6demo\u5C55\u793A\u533A\u57DF

`},sourceCode(){return{name:"domeVue2",components:{TinymceVue:l},data:function(){return{content:"Tinymce-plugin",tinymceOptions:{min_height:200,max_height:700,base_url:"/tinymce",plugins:"tp code tpIndent2em autoresize tpCollapse tpTabs tpButtons image preview",toolbar:["code tpIndent2em tpCollapse tpTabs tpButtons Preview"],skeletonScreen:!0}}}}},source(){return`
<template>
<div>
 <h1>\u63D2\u4EF6demo\u5C55\u793A\u533A\u57DF</h1>
  <div class="vueDemo">
    <tinymce-vue v-model="content" :init="tinymceOptions" ></tinymce-vue>
  </div>
  <div v-html="content"></div>
</div>
</template>

<script>
import "tinymce-plugin";
import "tinymce-plugin/plugins/tpIndent2em/plugin.js";
import "tinymce-plugin/plugins/tpImportword/plugin.js";
import TinymceVue from "@tinymce-plugin/tinymce-vue";
export default{
name: 'domeVue2',
components: { TinymceVue },
data(){
    return {
        content: 'Tinymce-plugin',
        tinymceOptions:{
                min_height: 200,
                max_height: 700,
                base_url:'/tinymce',
                plugins: 'tp code  tpIndent2em autoresize tpCollapse tpTabs tpButtons image preview',
                toolbar: ['code tpIndent2em tpCollapse tpTabs tpButtons Preview'],
                skeletonScreen: true,
             
        }
    }
  }
}
</script>
vue
`}};n.template=` `;const m={};m.methods={source(){return`
<script>
import React from 'react';
import ReactDOM from 'react-dom';
import tinymce from "tinymce";
import "tinymce-plugin";
import "tinymce-plugin/plugins/tpIndent2em/plugin.js";
import "tinymce-plugin/plugins/tpImportword/plugin.js";
import { Editor } from '@tinymce/tinymce-react';

     class ReactDemo extends React.Component{
       constructor(props) {
           super(props);
           this.state = { reactDemoInitialValue: "<p>\u8FD9\u662F\u4E00\u4E2AREactDemo</p>"};
           this.reactDemoInit = {
                    min_height: 220,
                    base_url:'/tinymce',
                    branding: false,
                    language:'zh_CN',
                    menubar: false,
                    skeletonScreen: true,
                    plugins: ['advlist autolink lists link image charmap print preview anchor', 'searchreplace visualblocks code fullscreen tpIndent2em autoresize tpCollapse tpTabs tpButtons', 'insertdatetime media table paste code help wordcount tpImportword'],
                    toolbar: 'undo redo tpIndent2em autoresize tpCollapse tpTabs tpButtons tpImportword | formatselect image | ' + 'bold italic backcolor | alignleft aligncenter ' + 'alignright alignjustify | bullist numlist outdent indent | ' + 'removeformat | help',
                    content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
             };
       this.handleChange = (data)=>{
              this.setState({reactDemoInitialValue: data})
        }
      }
      render(){
        return (
           <div>
            <h1>tinymce demo2</h1>
            <div>
            <Editor initialValue={this.state.reactDemoInitialValue} init={this.reactDemoInit} onEditorChange={this.handleChange} />
            </div>
            <div dangerouslySetInnerHTML={{__html: this.state.reactDemoInitialValue }} ></div>
          </div>
          );
      }
    }

   ReactDOM.render(<ReactDemo />, document.getElementById('ReactRootID'));
</script>
html
`},sourceCode(i){class e extends s.Component{constructor(c){super(c),this.state={reactDemoInitialValue:"

\u8FD9\u662F\u4E00\u4E2AREactDemo

"},this.reactDemoInit={min_height:220,base_url:"/tinymce",branding:!1,language:"zh_CN",menubar:!1,skeletonScreen:!0,plugins:["advlist autolink lists link image charmap print preview anchor","searchreplace visualblocks code fullscreen tpIndent2em autoresize tpCollapse tpTabs tpButtons","insertdatetime media table paste code help wordcount tpImportword"],toolbar:"undo redo tpIndent2em autoresize tpCollapse tpTabs tpButtons tpImportword | formatselect image | bold italic backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help",content_style:"body { font-family:Helvetica,Arial,sans-serif; font-size:14px }"},this.handleChange=r=>{this.setState({reactDemoInitialValue:r})}}render(){return s.createElement("div",null,s.createElement("h1",null,"tinymce demo2"),s.createElement("div",null,s.createElement(g,{initialValue:this.state.reactDemoInitialValue,init:this.reactDemoInit,onEditorChange:this.handleChange})),s.createElement("div",{dangerouslySetInnerHTML:{__html:this.state.reactDemoInitialValue}}))}}return u.render(s.createElement(e,null),i)}};m.template=` `;const k=y({components:{Demo0:o,Demo1:p,Demo2:a,Demo3:h,Demo4:j,Demo5:t,Demo6:n,Demo7:m},template:`

# \u5B9E\u4F8B Demo \u8BED\u6CD5


\u70B9\u51FB\u67E5\u770Bdemo\u7EC4\u7528\u6CD5
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
<demoGroup> <demoGroupItem title="Javascript"> // \u9700\u8981\u7A7A\u4E00\u884C\u5F88\u91CD\u8981 :::tinymce \`\`\`html <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="renderer" content="webkit"> <script src="https://cdn.staticfile.org/jquery/2.2.4/jquery.min.js"></script> <!-- <script src='./api/api.js'></script> --> <script src='https://tinymce-plugin.gitee.io/tinymce/tinymce.js'></script><!-- \u5FC5\u8981 --> <script src='https://unpkg.com/tinymce-plugin'></script><!-- \u5FC5\u8981 --> </head> <body tp-page-height="498"> <div class="demo"> <div id="tinymce-app"> ... </div> </div> <script> ... </script> </body> </html> \`\`\` ::: </demoGroupItem> <demoGroupItem title="Vue" active> :::tinymce-vue3 \`\`\`vue <template> <div> <h1>\u63D2\u4EF6demo\u5C55\u793A\u533A\u57DF</h1> <div class="vueDemo"> <tinymce-vue v-model="content" :init="tinymceOptions" ></tinymce-vue> </div> <div v-html="content"></div> </div> </template> <script> import tinymce from "tinymce"; import "tinymce-plugin"; import TinymceVue from "@tinymce-plugin/tinymce-vue"; import "tinymce-plugin/plugins/tpIndent2em"; import "tinymce-plugin/plugins/tpImportword"; export default{ name: 'domeVue3', components: { TinymceVue }, data(){ return { content: 'dsdsdssfdddddddddddddddddddsd', tinymceOptions:{ // custom_elements: 'tp-collapse', min_height: 200, max_height: 700, skeletonScreen: true, base_url:'/tinymce', plugins: 'tp code tpIndent2em autoresize tpCollapse tpTabs tpButtons tpImportword preview', toolbar: ['|code tpIndent2em tpCollapse tpTabs tpButtons tpImportword | Preview'], } } } } </script> \`\`\` ::: </demoGroupItem> <demoGroupItem title="Vue2"> :::tinymce-vue2 \`\`\`vue <template> <div> <h1>\u63D2\u4EF6demo\u5C55\u793A\u533A\u57DF</h1> <div class="vueDemo"> <tinymce-vue v-model="content" :init="tinymceOptions" ></tinymce-vue> </div> <div v-html="content"></div> </div> </template> <script> import tinymce from "tinymce"; import "tinymce-plugin"; import "tinymce-plugin/plugins/tpIndent2em"; import "tinymce-plugin/plugins/tpImportword"; import TinymceVue from "@tinymce-plugin/tinymce-vue"; export default{ name: 'domeVue2', components: { TinymceVue }, data(){ return { content: 'fivesdsdsd', tinymceOptions:{ min_height: 200, max_height: 700, base_url:'/tinymce', plugins: 'tp code tpIndent2em autoresize tpCollapse tpTabs tpButtons image preview', toolbar: ['code tpIndent2em tpCollapse tpTabs tpButtons Preview'], skeletonScreen: true, } } } } </script> \`\`\` ::: </demoGroupItem> <demoGroupItem title="React"> :::tinymce-react \`\`\`html <script> import React from 'react'; import ReactDOM from 'react-dom'; import tinymce from "tinymce"; import "tinymce-plugin"; import "tinymce-plugin/plugins/tpIndent2em"; import "tinymce-plugin/plugins/tpImportword"; import { Editor } from '@tinymce/tinymce-react'; class ReactDemo extends React.Component{ constructor(props) { super(props); this.reactDemoInit = { min_height: 220, base_url:'/tinymce', branding: false, language:'zh_CN', menubar: false, skeletonScreen: true, plugins: ['advlist autolink lists link image charmap print preview anchor', 'searchreplace visualblocks code fullscreen tpIndent2em autoresize tpCollapse tpTabs tpButtons', 'insertdatetime media table paste code help wordcount tpImportword'], toolbar: 'undo redo tpIndent2em autoresize tpCollapse tpTabs tpButtons tpImportword | formatselect image | ' + 'bold italic backcolor | alignleft aligncenter ' + 'alignright alignjustify | bullist numlist outdent indent | ' + 'removeformat | help', content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }' }; this.reactDemoInitialValue = "<p>\u8FD9\u662F\u4E00\u4E2AREactDemo</p>" } render(){ return ( <div> ... </div> ); } } ReactDOM.render(<ReactDemo />, document.getElementById('ReactRootID')); </script> \`\`\` ::: </demoGroupItem> </demoGroup>
md
\u70B9\u51FB\u67E5\u770Bjavascript\u7528\u6CD5
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
:::tinymce \`\`\`html <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="renderer" content="webkit"> <script src="https://cdn.staticfile.org/jquery/2.2.4/jquery.min.js"></script> <!-- <script src='./api/api.js'></script> --> <script src='https://tinymce-plugin.gitee.io/tinymce/tinymce.js'></script><!-- \u5FC5\u8981 --> <script src='https://unpkg.com/tinymce-plugin'></script><!-- \u5FC5\u8981 --> </head> <body tp-page-height="498"> <div class="demo"> <div id="tinymce-app"> ... </div> </div> <script> ... </script> </body> </html> \`\`\` :::
md
\u70B9\u51FB\u67E5\u770Bvue3 Dome\u7528\u6CD5
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
:::tinymce-vue3 \`\`\`vue <template> <div> <h1>\u63D2\u4EF6demo\u5C55\u793A\u533A\u57DF</h1> <div class="vueDemo"> <tinymce-vue v-model="content" :init="tinymceOptions" ></tinymce-vue> </div> <div v-html="content"></div> </div> </template> <script> import tinymce from "tinymce"; import "tinymce-plugin"; import TinymceVue from "@tinymce-plugin/tinymce-vue"; import "tinymce-plugin/plugins/tpIndent2em/plugin.js"; import "tinymce-plugin/plugins/tpImportword/plugin.js"; export default{ name: 'domeVue3', components: { TinymceVue }, data(){ return { content: 'tinymce-plugin', tinymceOptions:{ // custom_elements: 'tp-collapse', min_height: 200, max_height: 700, skeletonScreen: true, base_url:'/tinymce', plugins: 'tp code tpIndent2em autoresize tpCollapse tpTabs tpButtons tpImportword preview', toolbar: ['|code tpIndent2em tpCollapse tpTabs tpButtons tpImportword | Preview'], } } } } </script> \`\`\` :::
md
\u70B9\u51FB\u67E5\u770Bvue2 Dome\u7528\u6CD5
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
:::tinymce-vue2 \`\`\`vue <template> <div> <h1>\u63D2\u4EF6demo\u5C55\u793A\u533A\u57DF</h1> <div class="vueDemo"> <tinymce-vue v-model="content" :init="tinymceOptions" ></tinymce-vue> </div> <div v-html="content"></div> </div> </template> <script> import tinymce from "tinymce"; import "tinymce-plugin"; import "tinymce-plugin/plugins/tpIndent2em/plugin.js"; import "tinymce-plugin/plugins/tpImportword/plugin.js"; import TinymceVue from "@tinymce-plugin/tinymce-vue"; export default{ name: 'domeVue2', components: { TinymceVue }, data(){ return { content: 'five', tinymceOptions:{ min_height: 200, max_height: 700, base_url:'/tinymce', plugins: 'tp code tpIndent2em autoresize tpCollapse tpTabs tpButtons image preview', toolbar: ['code tpIndent2em tpCollapse tpTabs tpButtons Preview'], skeletonScreen: true, } } } } </script> \`\`\` :::
md
\u70B9\u51FB\u67E5\u770B React Dome\u7528\u6CD5
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
:::tinymce-react \`\`\`html <script> import React from 'react'; import ReactDOM from 'react-dom'; import tinymce from "tinymce"; import "tinymce-plugin"; import "tinymce-plugin/plugins/tpIndent2em/plugin.js"; import "tinymce-plugin/plugins/tpImportword/plugin.js"; import { Editor } from '@tinymce/tinymce-react'; class ReactDemo extends React.Component{ constructor(props) { super(props); this.reactDemoInit = { min_height: 220, base_url:'/tinymce', branding: false, language:'zh_CN', menubar: false, skeletonScreen: true, plugins: ['advlist autolink lists link image charmap print preview anchor', 'searchreplace visualblocks code fullscreen tpIndent2em autoresize tpCollapse tpTabs tpButtons', 'insertdatetime media table paste code help wordcount tpImportword'], toolbar: 'undo redo tpIndent2em autoresize tpCollapse tpTabs tpButtons tpImportword | formatselect image | ' + 'bold italic backcolor | alignleft aligncenter ' + 'alignright alignjustify | bullist numlist outdent indent | ' + 'removeformat | help', content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }' }; this.reactDemoInitialValue = "<p>\u8FD9\u662F\u4E00\u4E2AREactDemo</p>" } render(){ return ( <div> ... </div> ); } } ReactDOM.render(<ReactDemo />, document.getElementById('ReactRootID')); </script> \`\`\` :::
md
\u70B9\u51FB\u67E5\u770B tinymce-box\u7528\u6CD5
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
::::tinymce-box :::html \`\`\`html <textarea id='basic-example'> <p><img style="display: block; margin-left: auto; margin-right: auto;" title="Tiny Logo" src="https://www.tiny.cloud/docs/images/logos/android-chrome-256x256.png" alt="TinyMCE Logo" width="128" height="128" /></p> <h2 style="text-align: center;">Welcome to the TinyMCE editor demo!</h2> <h2>Got questions or need help?</h2> <ul> <li>Our <a href="https://www.tiny.cloud/docs/">documentation</a> is a great resource for learning how to configure TinyMCE.</li> <li>Have a specific question? Try the <a href="https://stackoverflow.com/questions/tagged/tinymce" target="_blank" rel="noopener"><code>tinymce</code> tag at Stack Overflow</a>.</li> <li>We also offer enterprise grade support as part of <a href="https://www.tiny.cloud/pricing">TinyMCE premium plans</a>.</li> </ul> <h2>A simple table to play with</h2> <table style="border-collapse: collapse; width: 100%;" border="1"> <thead> <tr> <th>Product</th> <th>Cost</th> <th>Really?</th> </tr> </thead> <tbody> <tr> <td>TinyMCE</td> <td>Free</td> <td>YES!</td> </tr> <tr> <td>Plupload</td> <td>Free</td> <td>YES!</td> </tr> </tbody> </table> <h2>Found a bug?</h2> <p> If you think you have found a bug please create an issue on the <a href="https://github.com/tinymce/tinymce/issues">GitHub repo</a> to report it to the developers. </p> <h2>Finally ...</h2> <p> Don't forget to check out our other product <a href="http://www.plupload.com" target="_blank">Plupload</a>, your ultimate upload solution featuring HTML5 upload support. </p> <p> Thanks for supporting TinyMCE! We hope it helps you and your users create great content.<br>All the best from the TinyMCE team. </p> </textarea> \`\`\` ::: :::js \`\`\`js tinymce.init({ selector: 'textarea#basic-example', height: 500, menubar: false, skeletonScreen: true, plugins: [ 'advlist autolink lists link image charmap print preview anchor', 'searchreplace visualblocks code fullscreen', 'insertdatetime media table paste code help wordcount' ], toolbar: 'undo redo | formatselect | ' + 'bold italic backcolor | alignleft aligncenter ' + 'alignright alignjustify | bullist numlist outdent indent | ' + 'removeformat | help', content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }' }); \`\`\` :::css \`\`\`css #basic-example{ color: #333; } \`\`\` ::: ::::
md
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
<textarea id='basic-example'> <h1><strong>\u{1F44B} Welcome !</strong></h1> <p><img style="display: block; margin-left: auto; margin-right: auto;" title="Tiny Logo" src="/thinymce-pluginIcon.png" alt="TinyMCE Logo" width="128" /></p> <p>\u6B22\u8FCE\u6765\u5230 <a href="https://github.com/tinymce-plugin" target="_blank"><strong><code class="fv-code_inline">Tinymce-plugin</code></strong></a></p><p>\u8FD9\u662F\u4E00\u4E2A\u4E13\u6CE8 \u63D0\u4F9B <strong>\u5F3A\u5927\u3001\u597D\u7528\u3001\u4E30\u5BCC</strong> \u7684 <a href="https://www.tiny.cloud" target="_blank"><code class="fv-code_inline">tinymce</code></a> \u5BCC\u6587\u672C\u7F16\u8F91\u5668 <strong>\u63D2\u4EF6</strong>\u3001<strong>\u6269\u5C55</strong> \u548C <strong>\u6280\u672F</strong> \u7684\u6280\u672F\u793E\u533A\uFF0C\u65B9\u4FBF <strong>\u4EA4\u6D41\u8BA8\u8BBA</strong>\uFF0C<strong>\u5206\u4EAB\u7ECF\u9A8C</strong> \u3002</p><p>\u672C\u793E\u533A\u6709\u591A\u4E2A\u4E0D\u9519\u7684\u63D2\u4EF6\u6216\u8005\u9879\u76EE\uFF0C\u6B22\u8FCE Star \u2B50 \u5173\u6CE8~</p> <h1> \u2728Tinymce-plugin</h1> <p><a href="https://github.com/tinymce-plugin" target="_blank"><img src="https://tinymce-plugin.github.io/badge.svg" alt="tinymce-plugin"></a>&nbsp; <a href="https://www.npmjs.com/package/tinymce-plugin" target="_blank"><img src="https://img.shields.io/npm/v/tinymce-plugin.svg" alt="release candidate"></a>&nbsp; <a href="https://www.tiny.cloud" target="_blank"><img src="https://img.shields.io/badge/tinymce-5.2.0~5.x.x-green.svg" alt="tinymce Version"></a>&nbsp; <a href="https://github.com/tinymce-plugin/tinymce-plugin/blob/main/LICENSE" target="_blank"><img src="https://img.shields.io/github/license/tinymce-plugin/tp-indent2em.svg" alt="GitHub license"></a>&nbsp; <a href="https://github.com/tinymce-plugin" target="_blank"><img src="https://img.shields.io/npm/dm/tinymce-plugin" alt="tinymce Version"></a></p> </textarea>
html
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
tinymce.init({ selector: 'textarea#basic-example', height: 500, menubar: false, skeletonScreen: true, plugins: [ 'advlist autolink lists link image charmap print preview anchor', 'searchreplace visualblocks code fullscreen', 'insertdatetime media table paste code help wordcount' ], images_upload_handler: function (blobInfo, succFun, failFun) { var file = blobInfo.blob(); var reader = new FileReader(); reader.onload = function(e){ succFun(e.target.result) } reader.readAsDataURL(file) }, toolbar: 'undo redo | formatselect | ' + 'bold italic backcolor | alignleft aligncenter ' + 'alignright alignjustify | bullist numlist outdent indent | ' + 'removeformat | help', content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }' });
js
  • 1
  • 2
  • 3
#basic-example{ color: #333; }
css
`});export{k as default};