Add content area within custom class property in Episerver - episerver

I am creating a custom class with the below given definition.
One of the property type given below is of type content area(Media).
Issue: Since this custom property is in a popup itself, when clicking on the create new block in media content area, it opens the list of blocks to be added behind this popup as shown in the image below(carousal block)
Because of this ,I am unable to add the block within the content area.
.Is there a way to handle this wherein I can add the block within this custom class?
Any help is appreciated.

A bit late to the party here but will go ahead and answer it anyway for anyone else in the future who might encounter the same problem. So one option is to go with what Ted Nyberg suggested which will in the end probably provide a cleaner user experience. This is however a bit more advanced approach necessary due to a limitation in the product.
Another approach is to create a block instead of your custom class. This will provide the proper editor experience when working with the content area and will be faster to implement if you have no or little experience with adding custom css to the edit ui.
This goes for CMS versions < 12 and I can't say if this is still a problem in version 12 or not.

Related

Quill JS | Implement multi page functionality

I am trying to implement multipage functionality with quill. I want to fix the height of each page, and when user reaches the end of page, instead of editor height to grow or scrollbar to appear, I want cursor to go to next page(editor), similar behaviour as observed in Google Docs or Microsoft word document.
I have already added 2 editors in the view, but not having any idea on how to switch to new page as cursor reaches the end of first page.
i come straight from google trying to figure out something similar with quill and as far as i know and as far as i came while researching this specific topic:
to me it seems as if its not possible with multiple editors since as soon as the user wants to select paragraphs/elements over a multi page span you'd have to figure out how to
make the selection actually possible (try to select content over a span of two div elements which both are "contenteditable"-enabled, which was one of my first tries kinda).
spread the selection on multiple editors (you'd have to keep track of how much the user selected and when and how far the selection is within which editor which is kinda tricky)
execute an action over multiple editors which will be especially hard since there is no thing as "shared toolbar" yet (as far as i know)
so i really hope (🙏) the time helped you to find an sharable 🤲 solution to this but as far as i built up my knowledge about quill so far (which is a bit over a few weeks old now).
what i will try in the near future is to add a new module to show a page break and style all other elements accordingly to simulate the look of a page.

Protecting custom inline elements in WPF RichTextBox

I'm currently spiking with the WPF RichTextBox before I decide whether or not it can be used in a project of mine.
What I need is to have elements of text representing various objects (other texts or objects), a bit like a WIKI but not quite. Clicking on such a text will make stuff happen, like navigating to other texts or providing additional options.
Anyway, as these little text bits represent other objects I would like to protect them but I have succeeded with this only in part: The user cannot position a caret inside such a text element and edit/delete it but it is still possible to make a selection and delete/replace it, including my custom elements.
Have anyone travelled down this road with the RichTextBox? My latest experiment was to simply record all custom text elements when being part of a selection and then restoring them after the (destructive) edit. That fell apart because I can't find a way to re-insert my custom inline elements (derived from the Run class). The only way I've found to programmatically insert a Run (based) element at a specified position (TextPosition) is via its constructor.
Well, any hints would be greatly appreciated.
You are really looking for a FlowDocument, not a RichTextBox.

Form editing notifications

I'm developing a WPF application that contains a lot of forms (about 20 different forms)
each form is connected to a ViewModel class that usually hold a single object that the form is editing its properties.
I need to give a graphical sign to the user if he changed something like in Word when you edited the document and it tells you need to save it.
If the user edited even one property I need to show that sign.
Is there a simple way to accomplish that? I don't want to create an event for every property editor I have (there are more than 300 of them).
Why not use INotifyPropertyChanged?!
Since you are using WPF, you can opt for SourceTrigger to Property Changed.
Check here, http://www.codeproject.com/Articles/15822/Bind-Better-with-INotifyPropertyChanged to know about using INotifyPropertyChanged.

How do I adjust the size of the dropdown portion of the a combobox with PyQt

I'm creating a program where the width of column needs to be relatively narrow, but when I add a combo box I have to increase the width so that I can read the listings in the drop down. I know that in HTML the drop down adjust to the length of longest entry, in Iron Python you can adjust the drop down width manually, but I can't seem to find any reference to either of these options in PyQt. If I'm missing it in the documentation, a friendly pointer to the right spot would be of great help. Thanks.
The dropdown portion is a component that inherits QAbstractItemView (usually QListView).
It is accessible via the view() getter of the QComboBox. You can play with its sizePolicy to get what you want.
If it is not satisfying, you can even set your own QAbstraItemView to the QComboBox via `setView'.
In Qt a widgets size is usually controlled by its layout. The layout management docs should help. In particular, take a look at QSizePolicy. If you're using designer, you can set these directly as properties, otherwise you'll need to do it in code. The basic layouts example may help as well.

What's the purpose of Winforms controls tags?

I see a 'Tag' property in the design view for most WinForms controls. I have never used this tag and want to know why I would want to use it.
It allows you to store some of your own data with a control. It mostly useful in tree controls where you might want each node/leaf to have some extra data associated with it. This way when you click on a node you can perform an action relevant to the node.
Its a general "catch-all" for additional data you wish to store with a control.
I too have never used it.
We perform heavy use of tags. We have some methods for checking input, and these methods checks whats in the tags in order to know what control to perform.
IE: if a textbox has RQ=1;DT=int;MAX=100
the automatic method knows that this text can not be left blank, that should accept only integers within 0 and 100.
We have a complete pseudo declarative language for this.
Kind of useful!
More specific for your question, Tags are for your use.
for example you have a lot of buttons with single method handling clicks. then at handler you have do differentiate them from each other. So you put some sort of id (or reference) and then access it there.

Resources