mirror of
https://github.com/tabler/tabler.git
synced 2026-07-21 21:11:43 +04:00
Tinymce (#1143)
This commit is contained in:
Generated
+4
@@ -78,6 +78,7 @@
|
||||
"list.js": "^2.3.1",
|
||||
"litepicker": "^2.0.12",
|
||||
"nouislider": "^15.6.0",
|
||||
"tinymce": "^6.0.3",
|
||||
"plyr": "^3.7.2",
|
||||
"tom-select": "^2.0.1"
|
||||
},
|
||||
@@ -112,6 +113,9 @@
|
||||
"nouislider": {
|
||||
"optional": true
|
||||
},
|
||||
"tinymce": {
|
||||
"optional": true
|
||||
},
|
||||
"plyr": {
|
||||
"optional": true
|
||||
},
|
||||
|
||||
+5
-1
@@ -119,7 +119,8 @@
|
||||
"litepicker": "^2.0.12",
|
||||
"nouislider": "^15.6.0",
|
||||
"tom-select": "^2.0.1",
|
||||
"plyr": "^3.7.2"
|
||||
"plyr": "^3.7.2",
|
||||
"tinymce": "^6.0.3"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"apexcharts": {
|
||||
@@ -152,6 +153,9 @@
|
||||
"tom-select": {
|
||||
"optional": true
|
||||
},
|
||||
"tinymce": {
|
||||
"optional": true
|
||||
},
|
||||
"jsvectormap": {
|
||||
"optional": true
|
||||
},
|
||||
|
||||
@@ -187,6 +187,9 @@ plugins:
|
||||
plyr:
|
||||
title: Inline player
|
||||
url: docs/inline-player.html
|
||||
tinymce:
|
||||
title: TinyMCE
|
||||
url: docs/tinymce.html
|
||||
|
||||
changelog:
|
||||
title: Changelog
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
"jsvectormap": "jsvectormap/dist/js/jsvectormap.min.js",
|
||||
"jsvectormap-world": "jsvectormap/dist/maps/world.js",
|
||||
"jsvectormap-world-merc": "jsvectormap/dist/maps/world-merc.js",
|
||||
"tinymce" :"tinymce/tinymce.min.js",
|
||||
"plyr": "plyr/dist/plyr.min.js"
|
||||
},
|
||||
"css": {
|
||||
|
||||
@@ -96,6 +96,10 @@ base:
|
||||
markdown:
|
||||
title: Markdown
|
||||
url: markdown.html
|
||||
tinymce:
|
||||
title: TinyMCE
|
||||
url: tinymce.html
|
||||
badge: New
|
||||
plyr:
|
||||
title: Inline player
|
||||
badge: New
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
---
|
||||
title: TinyMCE
|
||||
menu: docs.plugins.tinymce
|
||||
libs: tinymce
|
||||
description: The WYSIWYG editor that is flexible, customizable, and designed with the user in mind. TinyMCE can handle any challenge, from the most simple implementation through to the most complex use case.
|
||||
---
|
||||
|
||||
[TinyMCE](https://www.tiny.cloud/docs/) documentation.
|
||||
|
||||
## Default text editor
|
||||
|
||||
Initialize TinyMCE 6 on any element (or elements) on the web page by passing an object containing a selector value to `tinymce.init()`. The selector value can be any valid CSS selector.
|
||||
|
||||
{% capture code %}
|
||||
{% include ui/tinymce.html id="default" %}
|
||||
{% endcapture %}
|
||||
{% include example.html code=code %}
|
||||
@@ -0,0 +1,30 @@
|
||||
{% assign id = include.id | default: 'mytextarea' %}
|
||||
|
||||
<form method="post">
|
||||
<textarea id="tinymce-{{ id }}">Hello, <b>Tabler</b>!</textarea>
|
||||
</form>
|
||||
|
||||
{% capture_global scripts %}
|
||||
<script>
|
||||
// @formatter:off
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
tinyMCE.init({
|
||||
selector: '#tinymce-{{ id }}',
|
||||
height: 300,
|
||||
menubar: false,
|
||||
statusbar: false,
|
||||
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',
|
||||
content_style: 'body { font-family: -apple-system, BlinkMacSystemFont, San Francisco, Segoe UI, Roboto, Helvetica Neue, sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }'
|
||||
});
|
||||
})
|
||||
// @formatter:on
|
||||
</script>
|
||||
{% endcapture_global %}
|
||||
@@ -0,0 +1,21 @@
|
||||
---
|
||||
title: TinyMCE
|
||||
page-header: TinyMCE
|
||||
menu: base.tinymce
|
||||
libs: tinymce
|
||||
---
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Your name</label>
|
||||
<input type="text" class="form-control" placeholder="Name">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Description</label>
|
||||
{% include ui/tinymce.html %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -5,4 +5,5 @@
|
||||
@import "vendor/tom-select";
|
||||
@import "vendor/apexcharts";
|
||||
@import "vendor/jsvectormap";
|
||||
@import "vendor/plyr";
|
||||
@import "vendor/plyr";
|
||||
@import "vendor/tinymce";
|
||||
|
||||
Vendored
+25
@@ -0,0 +1,25 @@
|
||||
.tox-tinymce {
|
||||
border: 1px solid var(--#{$prefix}border-color) !important;
|
||||
border-radius: $border-radius !important;
|
||||
font-family: var(--tblr-font-sans-serif) !important;
|
||||
}
|
||||
|
||||
.tox-toolbar__group {
|
||||
padding: 0 .5rem 0;
|
||||
}
|
||||
|
||||
.tox:not(.tox-tinymce-inline) {
|
||||
.tox-editor-header {
|
||||
border-bottom: 1px solid var(--#{$prefix}border-color) !important;
|
||||
box-shadow: none !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.tox-tbtn {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.tox-statusbar {
|
||||
border-top: 1px solid var(--#{$prefix}border-color) !important;
|
||||
}
|
||||
Reference in New Issue
Block a user