Calls the edit handler to prepare the given content element for editing.<p>

@param clientId the element id
@param editOption the selected edit option
@param callback the callback to execute
480958
public void prepareForEdit(
        final String clientId,
        final String editOption,
        final I_CmsSimpleCallback<CmsUUID> callback) {

        CmsRpcAction<CmsUUID> action = new CmsRpcAction<CmsUUID>() {

            @Override
            public void execute() {

                getContainerpageService().prepareForEdit(
                    clientId,
                    editOption,
                    getData().getRpcContext().getPageStructureId(),
                    getData().getRequestParams(),
                    this);
            }

            @Override
            protected void onResponse(CmsUUID result) {

                callback.execute(result);
            }
        };
        action.execute();
    }
545992
protected void fixClientID() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "fixClientID");

        synchronized (stateLock) {
            clientIDFixed = true;
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "fixClientID");
    }
148413
function initSelect( elem, parsed, extra){
  var self = this;
  var wc = this.$watch(parsed, function(newValue){
    var children = elem.getElementsByTagName('option');
    for(var i =0, len = children.length ; i < len; i++){
      if(children[i].value == newValue){
        elem.selectedIndex = i;
        break;
      }
    }
  }, STABLE);

  function handler(){
    parsed.set(self, this.value);
    wc.last = this.value;
    self.$update();
  }
  // var isChanging = true 
  // var __change = function(){
  //   if(isChanging) return;
  //   isChanging = true;
  //   setTimeout(handler,0)
  // }

  dom.on( elem, "change", handler );

  
  if(parsed.get(self) === undefined && elem.value){
    parsed.set(self, elem.value);
  }

  return function destroy(){
    dom.off(elem, "change", handler);
    // @TODO remove __change function 
    // elem.__change = null;
  }
}
1232501
function(value, sendUpdatedEvt) {
	   if(this.editor) {
	      var iframeId = this.el.id+"_editor";
	      
	      // if editor iframe not rendered
	      if (!YAHOO.util.Dom.get(iframeId)) {
	         // put value in textarea : will be processed by this.editor._setInitialContent (clean html, etc...)
	         this.el.value = value;
	         
	      } else {
	         this.editor.setEditorHTML(value);
         }
      }
	   
   	if(sendUpdatedEvt !== false) {
   	   // fire update event
         this.fireUpdatedEvt();
      }
	}
1133921
private void removeClientId(String clientId) {
        //Sometimes the client Id will be null. For instance in the case QueueConnectionFactory, there is no default client Id specified in metatype.xml. 
        if (clientId == null)
            return; //do nothing

        ConcurrentHashMap<String, Integer> clientIdTable = JmsFactoryFactoryImpl.getClientIdTable();

        if (clientIdTable.containsKey(clientId)) {
            int referenceCount = clientIdTable.get(clientId).intValue();
            if (referenceCount == 1) {
                clientIdTable.remove(clientId);
            } else {
                clientIdTable.put(clientId, clientIdTable.get(clientId).intValue() - 1);
            }
        }
    }
1712
function updateEditorElement() {
		var element = this.element;

		// Some editor creation mode will not have the
		// associated element.
		if ( element && this.elementMode != CKEDITOR.ELEMENT_MODE_APPENDTO ) {
			var data = this.getData();

			if ( this.config.htmlEncodeOutput )
				data = CKEDITOR.tools.htmlEncode( data );

			if ( element.is( 'textarea' ) )
				element.setValue( data );
			else
				element.setHtml( data );

			return true;
		}
		return false;
	}
672134
public void setParamEditContext(String editContext) {

        m_paramEditContext = editContext;
        CmsObject cms = getCms();
        if ((cms != null) && (editContext != null)) {
            cms.getRequestContext().setAttribute(ATTRIBUTE_EDITCONTEXT, editContext);
        }
    }
1242322
function (event) {
            if (event.type == "dblclick" && this.controller.freeText) {
                var element = event.target;
                if (element.className.indexOf("xMultiAutoComplete_Option_Text") != -1) {
                    this._editMultiselectValue(element, event);
                }
            }
        }
1336907
public static boolean setEditable(Element element, String serverId, boolean editable) {

        I_CmsLayoutBundle.INSTANCE.editorCss().ensureInjected();
        NodeList<Element> children = CmsDomUtil.querySelectorAll(
            FIELD_SELECTOR + ENTITY_ID_SELECTOR_PREFIX + serverId + ENTITY_ID_SELECTOR_SUFFIX,
            element);
        if (children.getLength() > 0) {
            for (int i = 0; i < children.getLength(); i++) {
                Element child = children.getItem(i);
                if (editable) {
                    child.addClassName(I_CmsLayoutBundle.INSTANCE.editorCss().inlineEditable());
                } else {
                    child.removeClassName(I_CmsLayoutBundle.INSTANCE.editorCss().inlineEditable());
                }
            }
            return true;
        }
        return false;
    }
18061
protected void addOption(AbstractRenderAppender buffer, String type, String optionValue,
                             String optionDisplay, int idx, String altText, char accessKey, boolean disabled)
            throws JspException
    {
        ServletRequest req = pageContext.getRequest();
        if (_cr == null)
            _cr = TagRenderingBase.Factory.getConstantRendering(req);

        assert(buffer != null);
        assert(optionValue != null);
        assert(optionDisplay != null);
        assert(type != null);

        if (_orientation != null && isVertical()) {
            _cr.TR_TD(buffer);
        }

        _inputState.clear();
        _inputState.type = type;
        _inputState.name = getQualifiedDataSourceName();
        _inputState.value = optionValue;
        _inputState.style = _style;
        _inputState.styleClass = _class;

        if (isMatched(optionValue, null)) {
            _inputState.checked = true;
        }
        _inputState.disabled = isDisabled();
        _inputState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, ALT, altText);
        if (accessKey != 0x00)
            _inputState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, ACCESSKEY, Character.toString(accessKey));

        // if there are attributes defined push them to the options.
        if (_attrs != null && _attrs.size() > 0) {
            Iterator iterator = _attrs.keySet().iterator();
            for (; iterator.hasNext();) {
                String key = (String) iterator.next();
                if (key == null)
                    continue;

                String value = (String) _attrs.get(key);
                _inputState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, key, value);
            }
        }

        TagRenderingBase br = TagRenderingBase.Factory.getRendering(TagRenderingBase.INPUT_BOOLEAN_TAG, req);
        br.doStartTag(buffer, _inputState);
        br.doEndTag(buffer);

        String ls = _labelStyle;
        String lsc = _labelStyleClass;

        _spanState.style = ls;
        _spanState.styleClass = lsc;

        br = TagRenderingBase.Factory.getRendering(TagRenderingBase.SPAN_TAG, req);
        br.doStartTag(buffer, _spanState);
        buffer.append(optionDisplay);
        br.doEndTag(buffer);

        // backward compatibility this is now overridden by the _orientation
        if (_orientation == null) {
            _cr.BR(buffer);
        }
        else {
            if (isVertical()) {
                _cr.TR_TD(buffer);
            }
            else {
                _cr.NBSP(buffer);
            }
        }
    }
612581
public void setClientID(String clientID) {
        if (clientID == null || clientID.isEmpty()) {
            this.clientID = DEFAULT_CLIENT_ID;
            return;
        }
        this.clientID = clientID;
    }
1156003
function (editor, message, callback) {
      var rng = editor.selection.getRng();

      Delay.setEditorTimeout(editor, function () {
        editor.windowManager.confirm(message, function (state) {
          editor.selection.setRng(rng);
          callback(state);
        });
      });
    }
789039
function handleOptionClick(event) {
    let el;

    // find the element with the data
    // start with the target element
    if (event.target.dataset.optionValue) {
        el = event.target;
    // check up the tree one level (in case option text or status was clicked)
    } else if (event.target.parentNode.dataset.optionValue) {
        el = event.target.parentNode;
    }

    this.processAfterStateChange(el);
    this.expander.collapse();
    this.el.querySelector(comboboxHostSelector).focus();
}
393148
public void show(int clientX, int clientY) {
		if (onlyOneChoice()) {
			controller.createIconInContainer(selectedIconUrl, selectedMarkerShape);
		} else {
			dialog.setPopupPosition(clientX, clientY);
			dialog.show();
		}
	}
643013
public void getNewOptions(final String clientId, final I_CmsSimpleCallback<CmsDialogOptionsAndInfo> callback) {

        CmsRpcAction<CmsDialogOptionsAndInfo> action = new CmsRpcAction<CmsDialogOptionsAndInfo>() {

            @Override
            public void execute() {

                getContainerpageService().getNewOptions(
                    clientId,
                    getData().getRpcContext().getPageStructureId(),
                    getData().getRequestParams(),
                    this);
            }

            @Override
            protected void onResponse(CmsDialogOptionsAndInfo result) {

                callback.execute(result);
            }
        };

        action.execute();
    }
104737
function Editor(options) {
    this.options = options;
    window.indentUnit = options.indentUnit;
    this.parent = parent;
    this.doc = document;
    var container = this.container = this.doc.body;
    this.win = window;
    this.history = new History(container, options.undoDepth, options.undoDelay, this);
    var self = this;

    if (!Editor.Parser)
      throw "No parser loaded.";
    if (options.parserConfig && Editor.Parser.configure)
      Editor.Parser.configure(options.parserConfig);

    if (!options.readOnly)
      select.setCursorPos(container, {node: null, offset: 0});

    this.dirty = [];
    this.importCode(options.content || "");
    this.history.onChange = options.onChange;

    if (!options.readOnly) {
      if (options.continuousScanning !== false) {
        this.scanner = this.documentScanner(options.passTime);
        this.delayScanning();
      }

      function setEditable() {
        // In IE, designMode frames can not run any scripts, so we use
        // contentEditable instead.
        if (document.body.contentEditable != undefined && internetExplorer)
          document.body.contentEditable = "true";
        else
          document.designMode = "on";

        document.documentElement.style.borderWidth = "0";
        if (!options.textWrapping)
          container.style.whiteSpace = "nowrap";
      }

      // If setting the frame editable fails, try again when the user
      // focus it (happens when the frame is not visible on
      // initialisation, in Firefox).
      try {
        setEditable();
      }
      catch(e) {
        var focusEvent = addEventHandler(document, "focus", function() {
          focusEvent();
          setEditable();
        }, true);
      }

      addEventHandler(document, "keydown", method(this, "keyDown"));
      addEventHandler(document, "keypress", method(this, "keyPress"));
      addEventHandler(document, "keyup", method(this, "keyUp"));

      function cursorActivity() {self.cursorActivity(false);}
      addEventHandler(document.body, "mouseup", cursorActivity);
      addEventHandler(document.body, "cut", cursorActivity);

      // workaround for a gecko bug [?] where going forward and then
      // back again breaks designmode (no more cursor)
      if (gecko)
        addEventHandler(this.win, "pagehide", function(){self.unloaded = true;});

      addEventHandler(document.body, "paste", function(event) {
        cursorActivity();
        var text = null;
        try {
          var clipboardData = event.clipboardData || window.clipboardData;
          if (clipboardData) text = clipboardData.getData('Text');
        }
        catch(e) {}
        if (text !== null) {
          event.stop();
          self.replaceSelection(text);
          select.scrollToCursor(self.container);
        }
      });

      if (this.options.autoMatchParens)
        addEventHandler(document.body, "click", method(this, "scheduleParenHighlight"));
    }
    else if (!options.textWrapping) {
      container.style.whiteSpace = "nowrap";
    }
  }
835636
function Editrrr(options) {
      _classCallCheck(this, Editrrr);

      this.options = Object.assign({}, defaults, options);
      this.textarea = this.options.textarea;
      this.init();
    }