파이어폭스 검색엔진 추가하기
firefox search engine 추가 관련 xml spec.
이 방법은 add-on 을 이용해 바로 firefox 에 search engine 을 추가해 주고 싶을 때 사용하는 방법이다.
xml 을 firefox 에서 인식하는 법
여기에 이 xml 을 어떻게 install 하는지를 알려준다.
Foremost, it isn’t designed for building browsers. Despite being based on Chromium, WebView only supports a subset of web standards, as Google expects app developers to use native Android APIs, and not the Web, for advanced functionality.[ref. 1]이런 이유로 Gecko engine 을 사용하려고 한다고 한다.
<medium-editor>/dist/css/medium-editor.css <medium-editor>/dist/css/themes/default.css <medium-editor>/dist/js/medium-editor.js <medium-editor>/demo/absolute-container.html
var editor = new MediumEditor('.editable', { toolbar: { buttons: ['bold', 'italic', 'underline', 'highlighter'] }, extensions: { 'highlighter': new HighlighterButton(), ... } });
rangy.init(); var HighlighterButton = MediumEditor.Extension.extend({ name: 'highlighter', init: function () { this.classApplier = rangy.createClassApplier('highlight', { elementTagName: 'mark', normalize: true }); this.button = this.document.createElement('button'); this.button.classList.add('medium-editor-action'); this.button.innerHTML = '<b>H</b>'; this.button.title = 'Highlight'; this.on(this.button, 'click', this.handleClick.bind(this)); }, getButton: function () { return this.button; }, handleClick: function (event) { this.classApplier.toggleSelection(); // Ensure the editor knows about an html change so watchers are notified // ie: <textarea> elements depend on the editableInput event to stay synchronized this.base.checkContentChanged(); }, // 파란색 함수는 이미 효과가 적용된 text 를 select 했을 때 // 버튼이 눌러진 모습을 표현하기 위한 것이다. isAlreadyApplied: function (node) { return node.nodeName.toLowerCase() === 'mark'; }, isActive: function () { return this.button.classList.contains('medium-editor-button-active'); }, setInactive: function () { this.button.classList.remove('medium-editor-button-active'); }, setActive: function () { this.button.classList.add('medium-editor-button-active'); } });