返回介绍

Distraction-free editor example

发布于 2019-05-06 06:50:14 字数 6925 浏览 1011 评论 0 收藏 0

Live example

This example shows you how to use TinyMCE’s Distraction-free editor.

The latest and greatest from TinyMCE

The world’s first rich text editor in the cloud

Have you heard about Tiny Cloud? It’s the first step in our journey to help you deliver great content creation experiences, no matter your level of expertise. 50,000 developers already agree. They get free access to our global CDN, image proxy services and auto updates to the TinyMCE editor. They’re also ready for some exciting updates coming soon.

One of these enhancements is Tiny Drive: imagine file management for TinyMCE, in the cloud, made super easy. Learn more at tiny.cloud/tinydrive, where you’ll find a working demo and an opportunity to provide feedback to the product team.

An editor for every project

Here are some of our customer’s most common use cases for TinyMCE:

  • Content Management Systems (e.g. WordPress, Umbraco)
  • Learning Management Systems (e.g. Blackboard)
  • Customer Relationship Management and marketing automation (e.g. Marketo)
  • Email marketing (e.g. Constant Contact)
  • Content creation in SaaS systems (e.g. Eventbrite, Evernote, GoFundMe, Zendesk)

And those use cases are just the start. TinyMCE is incredibly flexible, and with hundreds of APIs there’s likely a solution for your editor project. If you haven’t experienced Tiny Cloud, get started today. You’ll even get a free trial of our premium plugins – no credit card required!

<div class='demo-dfree'>
  <h2 class="dfree-header mce-content-body" contenteditable="true" style="position: relative;" spellcheck="false">
    The latest and greatest from TinyMCE
  </h2>
  <br/>
  <div class="dfree-body mce-content-body" contenteditable="true" style="position: relative;" spellcheck="false">
    <p><img src="https://tiny.cloud/images/medium-pic.jpg" style="display: block; margin-left: auto; margin-right: auto; width: 100%;" data-mce-style="display: block; margin-left: auto; margin-right: auto;" data-mce-selected="1"></p>
    <br/>
    <h2>The world’s first rich text editor in the cloud</h2>

    <p>
      Have you heard about Tiny Cloud? 
      It’s the first step in our journey to help you deliver great content creation experiences, no matter your level of expertise. 
      50,000 developers already agree. 
      They get free access to our global CDN, image proxy services and auto updates to the TinyMCE editor. 
      They’re also ready for some exciting updates coming soon.
    </p>
  
  
    <p>
      One of these enhancements is <strong>Tiny Drive</strong>: imagine file management for TinyMCE, in the cloud, made super easy. 
      Learn more at <a href='https://www.tiny.cloud/tinydrive/'>tiny.cloud/tinydrive</a>, where you’ll find a working demo and an opportunity to provide feedback to the product team.
    </p>
  
    <h3>An editor for every project</h3>
  
    <p>
      Here are some of our customer’s most common use cases for TinyMCE:
      <ul>
        <li>Content Management Systems (<em>e.g. WordPress, Umbraco</em>)</li>
        <li>Learning Management Systems (<em>e.g. Blackboard</em>)</li>
        <li>Customer Relationship Management and marketing automation (<em>e.g. Marketo</em>)</li>
        <li>Email marketing (<em>e.g. Constant Contact</em>)</li>
        <li>Content creation in SaaS systems (<em>e.g. Eventbrite, Evernote, GoFundMe, Zendesk</em>)</li>
      </ul>
    </p>
  
    <p>
      And those use cases are just the start. 
      TinyMCE is incredibly flexible, and with hundreds of APIs there’s likely a solution for your editor project. 
      If you haven’t experienced Tiny Cloud, get started today. 
      You’ll even get a free trial of our premium plugins – no credit card required!
    </p>
  </div>
</div>
.demo-dfree {
  position: relative;
  width: 690px;
  box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.2);
  text-align: left;
  color: #626262;
  font-family: Lato;
  font-size: 14px;
  padding: 20px;
}
.demo-dfree *[contentEditable="true"]:hover {
  outline: 1px solid #2276d2;
}
.demo-dfree h1 {
  color: #1976d2;
  font-family: Aileron !important;
  font-size: 2em;
  font-weight: bold;
}
.demo-dfree h2 {
  color: #1976d2;
  font-family: Aileron;
  font-size: 2em;
  font-weight: bold;
}
.demo-dfree h3 {
  font-size: 1.5em;
  color: #403f42;
  font-weight: bold;
  color: inherit;
  font-family: Aileron;
}
.demo-dfree h2,
.demo-dfree h3 {
  margin-bottom: 0px;
  margin-top: 0px;
  line-height: 40px;
}
.demo-dfree ul,
.demo-dfree ol {
  padding-left: 20px;
}
.demo-dfree ul {
  list-style: disc;
}
.demo-dfree ol {
  list-style: decimal;
}
.demo-dfree a {
  text-decoration: underline;
}
.demo-dfree textarea {
  display: none;
}
.demo-dfree .dfree-header {
  font-size: 2.4em;
  text-align: center;
  margin: 10px;
}
.demo-dfree .dfree-body {
  padding: 20px;
  padding-top: 0px;
}
.demo-dfree .dfree-body p {
  margin-bottom: 10px;
}
.demo-dfree .dfree-body blockquote {
  margin-left: 30px;
  padding-left: 10px;
  margin-right: 40px;
  font-style: italic;
  border-left: 1px solid #696969;
}
.demo-dfree .dfree-body a {
  text-decoration: underline;
}
.demo-dfree .dfree-body td,
.demo-dfree .dfree-body tr {
  border: 1px solid #696969;
}
var dfreeHeaderConfig = {
  selector: '.dfree-header',
  menubar: false,
  inline: true,
  toolbar: false,
  plugins: [ 'quickbars' ],
  quickbars_insert_toolbar: 'undo redo',
  quickbars_selection_toolbar: 'italic underline'
};

var dfreeBodyConfig = {
  selector: '.dfree-body',
  menubar: false,
  inline: true,
  plugins: [
    'autolink',
    'codesample',
    'link',
    'lists',
    'media',
    'powerpaste',
    'table',
    'textcolor',
    'image',
    'quickbars'
  ],
  toolbar: false,
  quickbars_insert_toolbar: 'quicktable image',
  quickbars_selection_toolbar: 'bold italic | h2 h3 | blockquote quicklink',
  contextmenu: 'inserttable | cell row column deletetable',
  powerpaste_word_import: 'clean',
  powerpaste_html_import: 'clean'
};

tinymce.init(dfreeHeaderConfig);
tinymce.init(dfreeBodyConfig);

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文