1. Home
  2. Docs
  3. TinyMCEv5
  4. example範例
  5. 編輯器Distraction-free editor 直接文字上編輯

編輯器Distraction-free editor 直接文字上編輯

[code]
<!DOCTYPE html>
<html lang="en">
<head>
<!–
<script src="https://cdn.tiny.cloud/1/mott8ilewgbu1tryzfu9q7sdcmn5qfqt19jixbvaqgaz6kjc/tinymce/5/tinymce.min.js" referrerpolicy="origin"></script>
–>
<script src="https://code.jquery.com/jquery-1.11.3.js"></script>
<script src="../../../system/libs/tinymce/js/tinymce/tinymce.min.js" referrerpolicy="origin"></script>

<script>

tinymce.init({
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’,
‘image’,
‘quickbars’,
‘codesample’,
‘help’
],
toolbar: false,
quickbars_insert_toolbar: ‘quicktable image media codesample’,
quickbars_selection_toolbar: ‘bold italic underline | formatselect | blockquote quicklink’,
contextmenu: ‘undo redo | inserttable | cell row column deletetable | help’,
// powerpaste_word_import: ‘clean’,
// powerpaste_html_import: ‘clean’,
};

tinymce.init(dfreeBodyConfig);

</script>
</head>
<body>

<h2 id="richTextArea_www_powenko_com" class="dfree-header mce-content-body" contenteditable="true" style="position: relative;" spellcheck="false">
The latest and greatest from TinyMCE
</h2>
<br/>
<div id="richTextArea_www_powenko_com2" 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>

www.popwenko.com
</body>
</html>
[/code]