diff --git a/docs/modules/Components.md b/docs/modules/Components.md index 8d7779d40..2129ce02e 100644 --- a/docs/modules/Components.md +++ b/docs/modules/Components.md @@ -201,6 +201,7 @@ Now that we know how components work, we can start exploring the process of crea Let's say we want to make the editor understand and handle better `` elements +First of all, place your components inside a plugin diff --git a/src/commands/view/Preview.js b/src/commands/view/Preview.js index 7cbfe3fda..a5abf0e32 100644 --- a/src/commands/view/Preview.js +++ b/src/commands/view/Preview.js @@ -28,7 +28,7 @@ export default { const helper = document.createElement('span'); helper.className = `${pfx}off-prv fa fa-eye-slash`; editorEl.appendChild(helper); - helper.onclick = () => editor.stopCommand('preview'); + helper.onclick = () => this.stopCommand(); this.helper = helper; }