import"./pinia.js";import"./tinymce.js";import{E as l}from"./Editor.js";import"./plugin.js";import{R as s,E as r,a as o}from"./Editor2.js";import{M as j}from"./vue.js";const p={};p.methods={source(){return`
{}"><html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="shortcut icon" href="https://avatars.githubusercontent.com/u/87648636?s=60&v=4" type="image/x-icon">
<title>Tinymce-Plugin</title>
<style>
.open-plugin{
width:150px;
height: 30px;
display: flex;
padding: 0px 10px;
background-color:rgb(27, 158, 234);
border-radius:5px;
color:white;
font-size:0;
text-align:center;
cursor:pointer;
align-content: space-around;
flex-wrap: nowrap;
align-items: center;
justify-items: center;
}
.open-plugin img{
display: block;
width: 20px;
height: 20px;
}
.open-plugin span{
display: inline-block;
height:20px;
line-height:20px;
vertical-align: middle;
margin-left:10px;
font-size:14px;
}
</style>
<script src='/tinymce/tinymce.js'></script>
<script src="/tinymce/tinymce-plugin.js"></script>
<script src="https://unpkg.com/tinymce-plugin/langs/zh_CN.js"></script>
<script src="https://unpkg.com/tinymce-plugin/plugins/tpIndent2em/plugin.min.js"></script>
</head>
<body tp-page-height="298">
<div>
<textarea class="tinymce">
<p>\u8FD9\u662F\u4E00\u4E2A\u9996\u884C\u7F29\u8FDB\u63D2\u4EF6</p>
</textarea>
</div>
<div>
<p></p>
<a onclick="openPlugin()" class="open-plugin" title="\u70B9\u51FB\u8C03\u7528\u89E6\u53D1\u63D2\u4EF6" ><img src="https://avatars.githubusercontent.com/u/87648636?s=60&v=4" alt=""><span>\u70B9\u51FB\u8C03\u7528\u89E6\u53D1\u63D2\u4EF6</span></a>
</div>
<script>
tinymce.init({
selector: 'textarea.tinymce',
language: 'zh_CN',
skeletonScreen: true,
plugins: 'code tpIndent2em autoresize',
toolbar: 'code tpIndent2em'
});
var openPlugin=()=>{
tinymce.activeEditor.execCommand('mceTpIndent2em');
}
</script>
</body>
</html>
{}"><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";
export default{
name: 'domeVue3',
components: { TinymceVue },
data(){
return {
content: '\u8FD9\u662F\u4E00\u4E2A\u9996\u884C\u7F29\u8FDB\u63D2\u4EF6',
tinymceOptions:{
min_height: 300,
max_height: 700,
skeletonScreen: true,
base_url:'/tinymce',
plugins: 'code tpIndent2em preview autoresize',
toolbar: 'code tpIndent2em preview',
}
}
}
}
</script>
{}"><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";
export default{
name: 'domeVue3',
components: { TinymceVue },
data(){
return {
content: '\u8FD9\u662F\u4E00\u4E2A\u9996\u884C\u7F29\u8FDB\u63D2\u4EF6',
tinymceOptions:{
min_height: 300,
max_height: 700,
skeletonScreen: true,
base_url:'/tinymce',
plugins: 'code tpIndent2em preview autoresize',
toolbar: 'code tpIndent2em preview',
}
}
}
}
</script>
{}"><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 TinymceVue from "@tinymce-plugin/tinymce-vue";
export default{
name: 'domeVue2',
components: { TinymceVue },
data(){
return {
content: '\u8FD9\u662F\u4E00\u4E2A\u9996\u884C\u7F29\u8FDB\u63D2\u4EF6',
tinymceOptions:{
min_height: 300,
max_height: 700,
base_url:'/tinymce',
plugins: 'code tpIndent2em preview autoresize',
toolbar: 'code tpIndent2em Preview',
skeletonScreen: true,
}
}
}
}
</script>
{}"><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 TinymceVue from "@tinymce-plugin/tinymce-vue";
export default{
name: 'domeVue2',
components: { TinymceVue },
data(){
return {
content: '\u8FD9\u662F\u4E00\u4E2A\u9996\u884C\u7F29\u8FDB\u63D2\u4EF6',
tinymceOptions:{
min_height: 300,
max_height: 700,
base_url:'/tinymce',
plugins: 'code tpIndent2em preview autoresize',
toolbar: 'code tpIndent2em Preview',
skeletonScreen: true,
}
}
}
}
</script>
{}"><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 { 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: 'code tpIndent2em autoresize',
toolbar: 'undo redo code tpIndent2em',
content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
};
this.handleChange = (data)=>{
this.setState({reactDemoInitialValue: data})
}
}
render(){
return (
<div>
<h1>\u8FD9\u662F\u4E00\u4E2A\u9996\u884C\u7F29\u8FDB\u63D2\u4EF6</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>
\u8FD9\u662F\u4E00\u4E2AREactDemo
"},this.reactDemoInit={min_height:220,base_url:"/tinymce",branding:!1,language:"zh_CN",menubar:!1,skeletonScreen:!0,plugins:"code tpIndent2em autoresize",toolbar:"undo redo code tpIndent2em",content_style:"body { font-family:Helvetica,Arial,sans-serif; font-size:14px }"},this.handleChange=h=>{this.setState({reactDemoInitialValue:h})}}render(){return s.createElement("div",null,s.createElement("h1",null,"\u8FD9\u662F\u4E00\u4E2A\u9996\u884C\u7F29\u8FDB\u63D2\u4EF6"),s.createElement("div",null,s.createElement(r,{initialValue:this.state.reactDemoInitialValue,init:this.reactDemoInit,onEditorChange:this.handleChange})),s.createElement("div",{dangerouslySetInnerHTML:{__html:this.state.reactDemoInitialValue}}))}}return o.render(s.createElement(e,null),i)}};t.template=`\u5B9E\u73B0 tinymce \u5BCC\u6587\u672C\u6846\u9996\u884C\u7F29\u8FDB\u529F\u80FD \u80FD\u5F88\u597D\u914D\u5408 \u5B57\u4F53\u5927\u5C0F(fon-size) \u5B57\u6BCD\u95F4\u8DDD(letter-spacing) \u5B9E\u73B0\u9996\u884C\u7F29\u8FDB
{}"><script src="https://unpkg.com/tinymce-plugin/plugins/tpIndent2em/plugin.min.js"></script><!--\u5F15\u5165-->
<!-- \u4F7F\u7528 -->
<script>
tinymce.init({
...
plugins: "tpIndent2em"
toolbar: "tpIndent2em"
...
})
</script>
\u4F7F\u7528 tinymce-plugin \u5E93
{}">npm i tinymce-plugin
{}">yarn add tinymce-plugin -D
{}"> import "tinymce-plugin"
import "tinymce-plugin/plugins/tpIndent2em/plugin.js";
tinymce.init({
...
plugins: "tpIndent2em"
toolbar: "tpIndent2em"
...
})
{}">import "@tinymce/tp-indent2em"
{}">npm i @tinymce-plugin/tp-indent2em
{}">yarn add @tinymce-plugin/tp-indent2em -D
{}"> import "tinymce-plugin"
import "@tinymce-plugin/tp-indent2em";
tinymce.init({
...
plugins: "tpIndent2em"
toolbar: "tpIndent2em"
...
})
tpIndent2em
\u4F9D\u8D56 tinymce-plugin