_Execute JavaScript 메서드에서 선택 개체에 액세스하는 방법 리본 도구 모음에 단추를 추가 하는가?버튼에 이미지를 추가하는 방법은 무엇입니까?

StackOverflow https://stackoverflow.com/questions/9530495

  •  16-11-2019
  •  | 
  •  

문제

JavaScript의 _execute 메소드에서 선택 객체에 액세스 할 수 없습니다."지원되지 않는 함수 / 객체"로 오류를 제공하려고하면

다른 문제는 내 리본 도구 모음 버튼의 아이콘 이미지가 반영되지 않습니다.

도움이 되었습니까?

해결책

How have you defined you execute function? Here's one where the selection is accessible:

Sample.Commands.Example.prototype._execute=function Example$_execute(selection) 
{
    if (selection.getCount() == 1) {
        var uriSelection = selection.getItem(0);
        // Do something else
    }
};

For ribbon toolbar button icons, try something like the following in your CSS:

.tridion .ribbontoolbar .button.Example.text { 
    background-image:
        url(/WebUI/Editors/Sample/Themes/images/icons/example-icon32x32.png);
} 
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top