Modify panel position of ckeditor track changes plugin - plugins

I'm using the TrackChanges plugin of Ckeditor 5, and I would like to know if there is a way to modify the panelPosition and set it to panelPosition = 'sw'.

Related

GUI settings for adding borders to images in TinyMCE editor of Connections 6

We switched from CKEditor to the new TinyMCE editor in Connections 6 CR5. This was a huge improvement. But out of the box, TinyMCE misses some of the features from CKEditor. For example setting borders on images in a way that could be handled by end users (so no manual HTML/CSS changes).
How can we add such a feature to TinyMCE, that the users get some image property dialog that allows setting image borders?
The image plugin has a configuration property image_advtab, which is set to false by default. I tried to enable it and now we see the advanced tab in the image propertys, which allows setting a border (and also advanced attributes) easily:
To enable it, we need to re-add the plugin, since this allows to override it's variables. Add the following to the externalPlugins array in config.js (which is located in ${CUSTOMIZATION_DIR}/javascript/tiny/editors/connections/config.js):
{
name: "image",
url: pluginBaseDir + "image/plugin.min.js",
settings: {
image_advtab: true
}
}
pluginBaseDir is defined above the editor config:
var pluginBaseDir = "/connections/resources/web/tiny.editors.connections/tinymce/plugins/";

CkEditor: how to open my own plugin dialog

I'm new to CkEditor plugin development and have a simple question.
Following problem: I have a very 'special', non-consumer oriented media asset storage (stored as a tree hierarchy on the file system). The CkEditor user should find these media assets and so I implemented a plugin for this with a find that loads the tree on the left and displays the media assets on the left side. The user can now choose the tree item and choose the media asset on the left side. The plugin works, the code is generated with an img-Tag. When I double click on the new generated code, the 'image'-plugin-dialog gets loaded and not my custom dialog.
Question:
What can I do to tell CkEditor to open my dialog? I suppose, there is an internal mapping from tag -> dialog and the img-Tag loads the img-Dialog. Which possibilities do I have? Do I have to use custom tags for that?
The problem can be solved by using the 'doubleclick'-Hook, e.g.
initDoubleClickHandler: function(editor) {
editor.on( 'doubleclick', function(e) {
var selection = editor.getSelection();
var start = selection.getStartElement();
var attribute = start.getAttribute('data-type');
if ( attribute != undefined && attribute != null && attribute == 'myplugin' ) {
e.data.dialog = 'myPluginDialog';
}
});
}
The supported and easy way is to create your plugin as a widget with a dialog. You can control how CKEditor knows it's your special object and launches your dialog. You can either use an img with a special css style or create your own custom html tag (e.g. ).
Read the widget tutorial here (dialogs are explained in part 2 of this tutorial).

How refresh Flickity plugin?

I have a problem with Flickity plugin. I want to use this one mixed with svgLoader plugin. The slider animation does't work correctly because you need to resize the window for refresh flickity plugin.
You can try it here : http://thibaut-lalanne.com/
Thx
You can manually refresh the slider anytime.
yourFlickitySlider.resize();
Resize the carousel and re-position cells like so:
// jQuery
var $carousel = $('.carousel').flickity()
$carousel.flickity('resize')
// vanilla JS
var flkty = new Flickity('.carousel');
flkty.resize()
For examples see: https://flickity.metafizzy.co/api.html#resize

Open plugin dialog in TinyMCE

I have created plugin in TinyMCE to cutomize advimage plugin in it default. I added a browse button at the end of image url textbox in general tab. Here is my code:
tinyMCE.execCommand('mceAdvImgMgr',false,'src');
I can open my plugin. But I don't know how can i pass the value and get it in my plugin?
Because I want to pass ID from advimage(ID of image url image) to my plugin and then after select image from my plugin, it return image url to caller plugin(advimage)?
This is not that difficult, but depends on the point of time or action at which you want to assign the value to a variable.
You may i.e. save the value in the editor object:
tinyMCEPopup.editor.last_selected_value = value;
and get it from there later on
ed.last_selected_value

Initialize tinyMCE before textarea visible

how can I init tinyMCE before the element it is to apply to is not yet visible?
So yeah, this doesn't work in my case.
tinyMCE.init({
Assuming you are dynamically adding the textarea triggered from some action, then you can use the TinyMCE command "mceAddControl" to add TinyMCE to the page.
For example, if the textarea ID is "myText" then you add the editor control with
tinyMCE.execCommand('mceAddControl', true,"myText");
Of course, you need to setup the editor settings prior to adding the control. This is done by setting the setting attribute of the control. For example
tinyMCE.settings = {
theme: 'advanced',
....
};