Browse Source

Merge branch 'develop' into feature/version

pull/916/head
Shikha 7 years ago
committed by GitHub
parent
commit
16600b705f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      _config.yml
  2. 1
      _data/nav.yml
  3. 81
      _includes/codepens/classic/index.js
  4. 2
      _includes/release-notes/bugfixes.md
  5. 8
      _includes/template/bodycontents.html
  6. 2
      _scripts/get-baseurl.sh
  7. 1
      advanced/keyboard-shortcuts.md
  8. 1
      migration-from-4x.md
  9. 2
      plugins/permanentpen.md
  10. 4
      plugins/table.md
  11. 101
      ui-components/customsidebar.md
  12. 4
      wercker.yml

2
_config.yml

@ -4,7 +4,7 @@ baseurl: ""
shared_baseurl: ""
syntax_highlight_theme: "tomorrow-night"
cdnurl: "https://cloud.tinymce.com/5/tinymce.min.js"
codepen_url: "https://cloud.tinymce.com/5-testing/tinymce.min.js?apiKey=qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc"
codepen_url: "https://cloud.tinymce.com/5/tinymce.min.js?apiKey=qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc"
default_meta_keywords: tinymce, documentation, docs, plugins, customizable skins, configuration, examples, html, php, java, javascript, image editor, inline editor, distraction-free editor, classic editor
exclude:

1
_data/nav.yml

@ -471,6 +471,7 @@
- url: "#Context form buttons"
- url: "#Form API"
- url: "#Example configuration"
- url: "customsidebar"
- url: "toolbarbuttons"
- url: "typesoftoolbarbuttons"
pages:

81
_includes/codepens/classic/index.js

@ -1,41 +1,3 @@
var demoBaseConfig = {
selector: "textarea#classic",
width: 755,
height: 500,
resize: false,
autosave_ask_before_unload: false,
mentions_fetch: mentionsFetchFunction,
powerpaste_allow_local_images: true,
plugins: [
"a11ychecker advcode advlist anchor autolink codesample colorpicker fullscreen help image imagetools",
" lists link media noneditable powerpaste preview",
" searchreplace table template textcolor tinymcespellchecker visualblocks wordcount"
], /* removed: charmap insertdatetime print */
external_plugins: {
mentions: "//www.tiny.cloud/pro-demo/mentions/plugin.min.js",
moxiemanager: "//www.tiny.cloud/pro-demo/moxiemanager/plugin.min.js"
},
templates: [
{
title: "Non-editable Example",
description: "Non-editable example.",
content: table
},
{
title: "Simple Table Example",
description: "Simple Table example.",
content: table2
}
],
toolbar:
"insertfile a11ycheck undo redo | bold italic | forecolor backcolor | template codesample | alignleft aligncenter alignright alignjustify | bullist numlist | link image",
content_css: [
"//fonts.googleapis.com/css?family=Lato:300,300i,400,400i",
"//www.tiny.cloud/css/content-standard.min.css"
],
spellchecker_dialog: true,
spellchecker_whitelist: ['Ephox', 'Moxiecode']
};
var mentionsFetchFunction = function (query, success) {
var users = [
@ -106,7 +68,7 @@ var mentionsFetchFunction = function (query, success) {
"Matthew Bryant", "Tyler Rose", "Mildred Delgado", "Emma Peters", "Walter Delgado", "Lauren Gilbert", "Christopher Romero"
];
users = $.map(users, function (fullName) {
users = users.map(function (fullName) {
var userName = fullName.replace(/ /g, '').toLowerCase();
return {
@ -116,13 +78,52 @@ var mentionsFetchFunction = function (query, success) {
}
});
users = $.grep(users, function (user) {
users = users.filter(function (user) {
return user.name.indexOf(query.term) === 0
});
success(users)
};
var demoBaseConfig = {
selector: "textarea#classic",
width: 755,
height: 500,
resize: false,
autosave_ask_before_unload: false,
mentions_fetch: mentionsFetchFunction,
powerpaste_allow_local_images: true,
plugins: [
"a11ychecker advcode advlist anchor autolink codesample colorpicker fullscreen help image imagetools",
" lists link media noneditable powerpaste preview",
" searchreplace table template textcolor tinymcespellchecker visualblocks wordcount"
], /* removed: charmap insertdatetime print */
external_plugins: {
mentions: "//www.tiny.cloud/pro-demo/mentions/plugin.min.js",
moxiemanager: "//www.tiny.cloud/pro-demo/moxiemanager/plugin.min.js"
},
templates: [
{
title: "Non-editable Example",
description: "Non-editable example.",
content: table
},
{
title: "Simple Table Example",
description: "Simple Table example.",
content: table2
}
],
toolbar:
"insertfile a11ycheck undo redo | bold italic | forecolor backcolor | template codesample | alignleft aligncenter alignright alignjustify | bullist numlist | link image",
content_css: [
"//fonts.googleapis.com/css?family=Lato:300,300i,400,400i",
"//www.tiny.cloud/css/content-standard.min.css"
],
spellchecker_dialog: true,
spellchecker_whitelist: ['Ephox', 'Moxiecode']
};
var table = '<p>This table uses features of the non-editable plugin to make the text in the<br /><strong>top row</strong> and <strong>left column</strong> uneditable.</p>' +
' <table style="width: 60%; border-collapse: collapse;" border="1"> ' +
' <caption class="mceNonEditable">Ephox Sales Analysis</caption> ' +

2
_includes/release-notes/bugfixes.md

@ -452,7 +452,7 @@ The following Table of Contents related issues were reported during the develope
### Documentation
The following documentation related issues were reported during the developer's preview and are now fixed in the TinyMCE 5.0 BETA version. Refer to the latest [Documentation](https://www.tiny.cloud/docs-beta/) for more information.
The following documentation related issues were reported during the developer's preview and are now fixed in the TinyMCE 5.0 BETA version. Refer to the latest [Documentation](https://www.tiny.cloud/docs/) for more information.
| Issue key | Summary |
| DOC-98 | Typo - importcss_file_filter |

8
_includes/template/bodycontents.html

@ -10,11 +10,11 @@
<div>
<div class="versions">
<div class="dropdown">
TinyMCE v5 RC2
TinyMCE v5
<div class="dropdown-arrow"></div>
<div class="dropdown-options">
<a class="link-gelato" href="/docs-beta">TinyMCE v5 RC2</a>
<a class="link-gelato" href="/docs">TinyMCE v4</a>
<a class="link-gelato" href="/docs">TinyMCE v5</a>
<a class="link-gelato" href="/docs-4x">TinyMCE v4</a>
<a class="link-gelato" href="/docs-3x">TinyMCE v3</a>
</div>
</div>
@ -76,7 +76,7 @@
apiKey: 'd70977481e4a0b72eacaec1533b2d81b',
indexName: 'tiny',
inputSelector: '#searchInput',
algoliaOptions: { 'facetFilters': ["tags:docs-beta"] },
algoliaOptions: { 'facetFilters': ["tags:docs"] },
debug: true
});
</script>

2
_scripts/get-baseurl.sh

@ -2,5 +2,5 @@
set -e
echo "/docs-beta"
echo "/docs"

1
advanced/keyboard-shortcuts.md

@ -36,7 +36,6 @@ This is a list of available keyboard shortcuts within the editor body.
| Toggle Fullscreen | Ctrl+Shift+F | Ctrl+Shift+F | [fullscreen]({{ site.baseurl }}/plugins/fullscreen/) |
| Save | Ctrl+S | Command+S | [save]({{ site.baseurl }}/plugins/save/) |
| Find | Ctrl+F | Command+F | [searchreplace]({{ site.baseurl }}/plugins/searchreplace/) |
| Open wordcount dialog | Ctrl+Shift+C | Command+Shift+C | [wordcount]({{ site.baseurl }}/plugins/wordcount/) |
## Accessibility keyboard shortcuts

1
migration-from-4x.md

@ -181,6 +181,7 @@ The methods for registering components have moved to a different part of the edi
| editor.addButton(identifier, configuration) | editor.ui.registry.addButton(identifier, configuration) | [Toolbar Buttons]({{site.baseurl}}/ui-components/typesoftoolbarbuttons/) |
| editor.addContextToolbar: (name, spec) | editor.ui.registry.addContextToolbar | [Context toolbar]({{site.baseurl}}/ui-components/contexttoolbar/) |
| editor.addMenuItem: (name, spec) | editor.ui.registry.addMenuItem | [Menu Item]({{site.baseurl}}/migration-from-4x/#custommenuitems) |
| editor.addSidebar: (name, spec) | editor.ui.registry.addSidebar: (name, spec) | [Sidebar]({{site.baseurl}}/ui-components/customsidebar/)|
#### New methods

2
plugins/permanentpen.md

@ -68,7 +68,7 @@ There are two ways to access the Permanent Pen properties:
#### From the menubar
Add the Permanent pen properties option to the menu bar with the [menu]({{site.baseurl}}/docs-beta/configure/editor-appearance/#menu) configuration.
Add the Permanent pen properties option to the menu bar with the [menu]({{site.baseurl}}/docs/configure/editor-appearance/#menu) configuration.
```js
tinymce.init({

4
plugins/table.md

@ -152,7 +152,7 @@ This option enables you to specify the default styles for inserted tables.
**Type:** `Object`
**Default Value:** `{ 'border-collapsed': 'collapse', 'width': '100%' }`
**Default Value:** `{ 'border-collapse': 'collapse', 'width': '100%' }`
##### Example
@ -449,4 +449,4 @@ tinymce.activeEditor.plugins.table.insertTable(2, 3);
| newrow | Fired when a row is created |
| newcell | Fired when a cell is created |
| ObectResizeStart | Fired when a resize action is started on a table, row, column or cell using the resize bars |
| ObjectResized | Fired when a resize action is finished on a table, row, column or cell using the resize bars |
| ObjectResized | Fired when a resize action is finished on a table, row, column or cell using the resize bars |

101
ui-components/customsidebar.md

@ -0,0 +1,101 @@
---
layout: default
title: Custom sidebar
title_nav: Custom sidebar
description_short: Introducing sidebar panel creation.
description: A short introduction to creating sidebars.
keywords: sidebar
---
TinyMCE allows developers to create sidebars and add custom UI widgets inside a constrained and easily accessible area of the editor. The sidebar is designed to allow administrators and plugin developers to provide additional tools that can be accessed by TinyMCE users.
## Editor sidebar API
The sidebar API allows developers to add sidebars on editor instances in a similar way as adding buttons or menu items. Developers can either add sidebars directly in the `tinymce.init` using the setup callback or inside your plugin.
This is the syntax for the addSidebar function: `editor.ui.registry.addSidebar(name:String, spec:Object)`
### Specification object
#### `tooltip`
The `tooltip` specifies a tooltip to be displayed when hovering over the sidebar toggle button.
**Type**: `String`
#### `icon`
The `icon` specifies an icon for the sidebar toggle button. The icon should be the name of an icon provided by the TinyMCE skin.
**Type**: `String`
#### `onSetup`
The `onSetup` specifies a function to be called when the panel is first created. It passes in an API object and should return a callback that takes an API. The default is `(api) => (api) => {}`.
`onSetup` is a complex property. It requires a function that takes the sidebar’s API and should return a callback that takes the sidebar's API and returns nothing. This occurs because `onSetup` runs whenever the sidebar is rendered, and the returned callback is executed when the sidebar is destroyed. Therefore the returned function is essentially an `onTeardown` handler, and can be used to unbind events and callbacks.
**Type**: `function`
#### `onShow`
The `onShow` specifies a function to be called when the panel displayed. It passes in an API object.
**Type**: `function`
#### `onHide`
The `onHide` specifies a function to be called when the panel is hidden. It passes in an API object.
**Type**: `function`
### API Object
#### `element():HTMLElement`
The `element():HTMLElement` function returns the root element of the sidebar panel.
## Example inside the tinymce.init
```js
tinymce.init({
...
setup: function (editor) {
editor.ui.registry.addSidebar('mysidebar', {
tooltip: 'My sidebar',
icon: 'settings',
onSetup: function (api) {
console.log('Render panel', api.element());
},
onShow: function (api) {
console.log('Show panel', api.element());
api.element().innerHTML = 'Hello world!';
},
onHide: function (api) {
console.log('Hide panel', api.element());
}
});
}
});
```
## Example inside a TinyMCE plugin
```js
tinymce.PluginManager.add('myplugin', function (editor) {
editor.ui.registry.addSidebar('mysidebar', {
tooltip: 'My sidebar',
icon: 'settings',
onSetup: function (api) {
console.log('Render panel', api.element());
},
onShow: function (api) {
console.log('Show panel', api.element());
api.element().innerHTML = 'Hello world!';
},
onHide: function (api) {
console.log('Hide panel', api.element());
}
});
});
```

4
wercker.yml

@ -39,7 +39,7 @@ deploy:
invalidate_cache:
steps:
- script:
code: aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --paths "/docs-beta/*"
code: aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --paths "/docs/*"
deploy_branch:
steps:
@ -57,5 +57,5 @@ deploy_branch:
- s3sync:
key-id: $AWS_ACCESS_KEY_ID
key-secret: $AWS_SECRET_ACCESS_KEY
bucket-url: $S3_BUCKET/docs-beta/
bucket-url: $S3_BUCKET/docs/
source-dir: $S3_SOURCE
Loading…
Cancel
Save