Skip to content

Commit

Permalink
Merge branch '5.x' into ref/deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
theus77 authored Dec 15, 2023
2 parents 3dcd0de + 99918d9 commit 4224382
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
9 changes: 9 additions & 0 deletions EMS/core-bundle/assets/cke-plugins/adv_link/dialogs/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
uploadTab = dialog.definition.getContents( 'upload' ),
uploadInitiallyHidden = uploadTab && uploadTab.hidden;

dialog
.getContentElement('target', 'linkTargetType')
.setValue(emsConfig.hasOwnProperty('urlTargetDefaultBlank') && emsConfig.urlTargetDefaultBlank.includes(typeValue) ? '_blank' : 'notSet');

if ( typeValue == 'url' || typeValue == 'localPage' || typeValue == 'fileLink' ) {
if ( editor.config.linkShowTargetTab )
dialog.showPage( 'target' );
Expand Down Expand Up @@ -171,6 +175,11 @@
title : linkLang.selectContentTypeTitle,
'default': localContentTypes[0][1],
items : localContentTypes,
onChange: function () {
this.getDialog()
.getContentElement('target', 'linkTargetType')
.setValue(emsConfig.hasOwnProperty('urlTargetDefaultBlank') && emsConfig.urlTargetDefaultBlank.includes(this.getValue()) ? '_blank' : 'notSet');
},
setup: function( data ) {
if(data.type == 'localPage' && data.filter){
this.setValue( data.filter );
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion EMS/core-bundle/src/Resources/public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@
"js/ace/mode-qml.js": "bundles/emscore/js/ace/mode-qml.js",
"js/ckeditor/lang/si.js": "bundles/emscore/js/ckeditor/lang/si.js",
"js/ace/mode-nginx.js": "bundles/emscore/js/ace/mode-nginx.js",
"js/cke-plugins/adv_link/dialogs/link.js": "bundles/emscore/js/cke-plugins/adv_link/dialogs/link.js",
"js/ace/mode-elixir.js": "bundles/emscore/js/ace/mode-elixir.js",
"js/ckeditor/plugins/scayt/dialogs/options.js": "bundles/emscore/js/ckeditor/plugins/scayt/dialogs/options.js",
"js/ace/mode-sass.js": "bundles/emscore/js/ace/mode-sass.js",
"js/ace/mode-ocaml.js": "bundles/emscore/js/ace/mode-ocaml.js",
"js/cke-plugins/adv_link/dialogs/link.js": "bundles/emscore/js/cke-plugins/adv_link/dialogs/link.js",
"js/ckeditor/lang/fa.js": "bundles/emscore/js/ckeditor/lang/fa.js",
"js/ace/ext-settings_menu.js": "bundles/emscore/js/ace/ext-settings_menu.js",
"js/ckeditor/skins/moono-lisa/dialog_ie8.css": "bundles/emscore/js/ckeditor/skins/moono-lisa/dialog_ie8.css",
Expand Down
18 changes: 10 additions & 8 deletions docs/elasticms-admin/wysiwyg/wysiwyg.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,21 @@ For building the json, the ckeditor [Toolbar Configurator](https://ckeditor.com/

EMS settings are used over customizing the CKEditor experience.

| Property | Description |
|--------------------|--------------------------------------------------------------------------|
| urlTypes | Limit the url types when creating a url |
| urlAllContentTypes | Disable the option `All ContentTypes` on internal url |
| translations | See [translations](#translations) section |
| paste | See [paste](#paste) section |
| paste.sanitize | Call html standard [sanitize](../dev/helpers/standard.md#sanitize) |
| paste.prettyPrint | Call html standard [prettyPrint](../dev/helpers/standard.md#prettyPrint) |
| Property | Description |
|-----------------------|----------------------------------------------------------------------------|
| urlTypes | Limit the url types `["url", "anchor", "localPage", "fileLink", "email"]` |
| urlAllContentTypes | Disable the option `All ContentTypes` on internal url |
| urlTargetDefaultBlank | Set target default to _blank. Array with contentType name or/and urlTypes |
| translations | See [translations](#translations) section |
| paste | See [paste](#paste) section |
| paste.sanitize | Call html standard [sanitize](../dev/helpers/standard.md#sanitize) |
| paste.prettyPrint | Call html standard [prettyPrint](../dev/helpers/standard.md#prettyPrint) |

```json
{
"ems": {
"urlTypes": ["url", "anchor", "localPage", "fileLink", "email"],
"urlTargetDefaultBlank": ["url", "fileLink", "media_file", "asset"],
"urlAllContentTypes": true,
"translations": {
"nl": {
Expand Down

0 comments on commit 4224382

Please sign in to comment.