Kentico 10 | Toolbar for Rich Text Editor in a Custom Component - properties

I can create a custom toolbar for the EditableText Web Part in Kentico 10, as there is plenty of documentation on how to create/set custom toolbars .. but I can ONLY find documentation for the EditableTextWebPart.
I need to create unique toolbars to be used within several custom Web parts for certain properties / fields. I can't find any documentation on setting them within my own custom Web part, and am hoping someone could point me in the correct direction.

Sounds like you're mixing a few things up. Each webpart has properties. Each property has an associated control. The control you use is based on the datatype of the field.
If you have a long text datatype on your webparts property you should be able to pick the rich text editor as your control. Then create a custom widget for the WYSIWYG editor.
Now if you don't want to work with the WYSIWYG editor then, create your own custom form control.
Check out this article on customizing the WYSIWYG editor. At the end of the article it has a reference to custom widgets for your WYSIWYG editor.

So the answer was under my nose, albeit a bit hidden.
In the /CMS/CMSAdminControls/CKeditor/config.js I added my own custom toolbar, which I had already created, but hand't figured out how to hand it off to the Web part property.
config.toolbar_Caption =
[
['Undo', 'Redo', '-'],
['Cut', 'Copy', 'Paste', 'PasteText', 'Scayt', '-'],
['Bold', '-'],
['InsertLink', 'Unlink', '-'],
['Maximize']
];
The web part has a property, named Caption, with the Data type set to Long text and the Form Comtrol set to Rich Text Editor.
Under Editing control settings, expand Advanced to access Toolbar set and set it to the custom toolbar. In my example, that would be Caption.
Also set the Toolbar location to In so that the toolbar is within the text area vs. floating on top of the entire form.

Related

VB.Net: Winforms Designer: Use verbs from custom control in parent custom control

We're developing a custom control (to make our lives easier), which included a customs (external) grid control and some default buttons and text. The grid control has the option to add columns by clicking the small arrow on the top right of the grid in designer, like shown in the picture.
We want to keep this option when putting our new custom control on a (win)form. Is there any way we can achieve this?
I've already looked into the 'verbs' and I can add my own custom verbs to the new control, but I'm not sure the arrow is a verb (as it does not show the option on the bottom of the properties). I also haven't been able to find how to use the verbs from the grid control.
Thank you very much!
I've found the solution to my problem.
I thought the way to add columns was a custom control when in reality, it was a default CollectionEditor. This, in combination with Smart Tag, solved my problem.

How to implement advanced custom properties in VB6 usercontrols?

Sorry I don't know how to name it other than "advanced custom properties". If I know, I would search it first.
I am dealing with a legacy code using 3-rd party controls.
In VB6, When you drag that control onto the form, you can see all the properties supported by the control in the "Properties" window. Such as MarginLeft, MarginRight etc. etc.
That's no problem.
In the "Property" window, the top-most property is generally the "(Name)" field, which is the name of the control.
But the 3-rd party control I am using, has another two "fake properties" above "(Name)", which are "(About)" and "(Custom)".
When you click "(About)", there will be a dialog box showing the company info. When you click "(Custom)", there will be another dialog box showing more properties. These dialog boxes are shown in VB6.
In the "(Custom)" dialog box, you can modify normal properties (same as modifying directly in the Property window). You can do more. There are more properties that are not normal properties (at least you cannot find anything in the Property window).
When you save this form, for normal properties, everything are saved into .FRM file. E.g.,
Control1.MarginLeft = 5
Control1.Text = "I am a control"
However, for the "advanced properties" edited in the (Custom) dialog box, they are not saved in .FRM, they are saved in .FRX in binary format.
E.g., in (Custom) dialog box, you can edit a property called "Caption", which includes text of this caption, the font, the weight, the display style, and a lot of similar properties for Caption. In .FRM, it is something like,
Control1.Caption = "frmForm1.frx":013F
All the text and related properties of Caption are saved in binary format in .FRX file.
Note that, there's no Caption property in the normal Property window, you can only edit it in the "(Custom)" dialog box.
My question is as follows,
How to implement such a (Custom) dialog box that can be shown in VB6?
How to let VB6's Property window display (About) and (Custom)?
How to tell VB6 that Caption property shall not be displayed in Property window, but you can use directly in code as Control1.Caption = xxxx.frx:offset?
How to tell VB6 that this Caption property shall be saved in .FRX, and how to tell VB6 the size of the data, so that VB6 can manages the offset automatically?
How to load the data automatically via VB6 so that the correct values can be displayed in (Custom) dialog box?
As far as I know, .frx formats are secrets, there are a lot of ppl digging into various .frx for standard controls such as Binary(images), List, and Text. I am curious how can a 3-rd party control utilizing .frx, shall the 3-rd party control define its own .frx format? Including for example, how many bytes in front for Length (or no length field at all, it's fixed length), how many bytes for style1, how many bytes for style2, etc.
Thanks a lot. If you know what proper name it is for this "advanced properties", just tell me the name and I can search myself.
I tried to search for advanced properties but didn't really get anything I want to know.
The frx files are for binary or other non-basic data types. The frm will store the simple properties. What you need to do is to hook into the UserControl events WriteProperties and ReadProperties. You don't need to know where the backing storage is (frm vs frx)., you just need to access the PropBag to read and write your data.
Google is your friend to find the documentation:
https://msdn.microsoft.com/en-us/library/aa242140(v=vs.60).aspx
Or additional information on the topic:
http://www.vbforums.com/showthread.php?365735-Classic-VB-How-do-the-ReadProperties-and-WriteProperties-work-(PropertyBags)&s=3cfbd675928ad1eb94f68fbfb13ccd88&p=3672781&viewfull=1#post3672781
Good luck!

XPages: How to create Dojo widgets within rich text content in a xpage

I have an xpage that contains a rich text field that uses CKEditor. I have set the toolbar attribute to Full to get the source button so my users can actually create tabs and other items so their content looks good.
I am trying to create a dojo dijit tooltip but it just doens't seem to work. I added the code found on the Dojo web site, but nothing happens.
Am I missing something?
Thanks
I guess it's the htmlFilter/htmlFilterIn property of your richtext control (i.e. field). To add source code "as is" it has to be set to "identity". No guarantee if you can add Dojo widgets directly via the source code though.

Kendo-ui MVC PopUp editor: How to hide fields

I'm using Kendo ASP.NET MVC and I would like to have some control over the edit form.
Things I would like to do:
Hide my ID field
Change my Property Code and Square Feet to regular TextBoxFor fields
Change Date of Purchase and Date of Sale to Kendo DatePickerFor instead of the DateTimePickerFor that is showing.
Link to screenshot of editor form
When you click edit, Kendo uses the default EditorTemplate for the object. If you're not familiar how editor templates work, check this article.
You have two ways of solving it, either by creating a custom view editor templates that only lists the fields you want. Or (and this is simpler and preferred method), in many cases you can get away with the default editor template and control which fields are rendered (and how) using metadata on the object. You can hide individual properties by tagging them with [ScaffoldColumn(false)] attribute. In terms of controlling the types of editors that show up, you can accomplish this by tagging your properties with [DataType(DataType.Date)] or [DataType(DataType.Text)]

Best way to change font properties in lightswitch

How can i change Label font properties (size, font and color) for any screen item i have ??
i found an extension that can give me some properties to play with (Pixata Custom Controls for lightswitch)
the problem with it is that i can change only data properties i cant play with the label style itself
for example if i have textbox screen item lightswitch will generate a label and a text box for me in the Pixata extension i can only manipulate the texbox but not the label
so what is the best way to manipulate font properties in general and label font properties in particular?
I found the answer from BethMassi in her awesome blog which was as follow
You can select the style in the properties window for the control on the screen designer. Controls support basic Normal, Warning, Heading 1, etc. styles. If you want to change all colors, fonts, etc. then you need to create or download a theme. If you just want a single control to show in a different font/color then you can create a custom control.
thanks a lot beth
Thanks Everyone :)
3oon