크롬 확장에서 ContextMenu
으로 선택한 DOM을 가져 오려고합니다.크롬 확장 프로그램에서 선택 DOM 가져 오기 contextmenu
코드 :
chrome.contextMenus.onClicked.addListener(function(info, tab){
// the info.selectionText just the text, don not contains html.
});
chrome.contextMenus.create({
title: "Demo",
contexts: ["selection"],
id: "demo"
});
하지만 info.selectionText 할이되지는 HTML DOM이 포함되어 있습니다. Chrome 확장 프로그램 contextMenu에서 선택 영역을 가져올 수있는 방법이 있습니까? 제발 제안 해주세요. 감사.
의 사용 가능한 복제 [HTML을 포함한 페이지의 선택을 받기?] (http://stackoverflow.com/questions/3461989를/get-page-selection-html 포함) –