We am developing a custom HTML editor that will show the HTML editor with third JS library files.

In core DB We have added a menu commend (copy of Existing rich text edit button and updated our command name rich:editor) that comes just top of Rich text field. Here we are able to pass current Items with ($TargetId) but we also need current filed ID so that we can use current selected filed in dialog box code to save custom html to respective filed.

Here we want to send the two filed id's on click of rich text menu command button one for Current filed and second another filed Id that also belong to current Sitecore selected item.

FYI - Inside Run method of Command we are able to get Current Item but here We want some additional filed as well. Any kind of help will be helpful for us. enter image description here

1 Answer 1


There is a query string parameter fld that should be already present out of the box:

enter image description here

But as you need to have 2 field, I suggest you to

  1. Override Class and Assebly fields for your /sitecore/system/Field types/Simple Types/Rich Text item.
    public class YourRTEEditor : RichText
        /// <summary>Gets or sets the field ID.</summary>
        /// <value>The field ID.</value>
        public string FieldID
                return this.GetViewStateString(ExtensionMethods.nameof(() => FieldID));
                Assert.ArgumentNotNull((object)value, ExtensionMethods.nameof(() => value));
                this.SetViewStateString(ExtensionMethods.nameof(() => FieldID), value);
  1. Change logic and pass 2 fields there instead of one

I did something similar with passing 2 parameters for datasouce for the TinyMCE module, you can look at it as a reference.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.