This commit is contained in:
Philipp Kühn 2019-06-04 22:44:12 +02:00
parent 5c9948a330
commit 11c40f07a5

View File

@ -119,10 +119,18 @@
type="text" type="text"
v-model="replaceWith" v-model="replaceWith"
/> />
<button class="button" @click="editor.commands.find(searchTerm)">Find</button> <button class="button" @click="editor.commands.find(searchTerm)">
<button class="button" @click="editor.commands.clearSearch()">Clear</button> Find
<button class="button" @click="editor.commands.replace(replaceWith)">Replace</button> </button>
<button class="button" @click="editor.commands.replaceAll(replaceWith)">Replace All</button> <button class="button" @click="editor.commands.clearSearch()">
Clear
</button>
<button class="button" @click="editor.commands.replace(replaceWith)">
Replace
</button>
<button class="button" @click="editor.commands.replaceAll(replaceWith)">
Replace All
</button>
</div> </div>
</div> </div>
@ -192,25 +200,11 @@ export default {
], ],
content: ` content: `
<h2> <h2>
Hi there, Search and Replace
</h2> </h2>
<p> <p>
this is a very <em>basic</em> example of tiptap. Search something. 🔍 Replace something. Or replace all the things! 💥 That's it. That's how a search works. Good luck.
</p> </p>
<pre><code>body { display: none; }</code></pre>
<ul>
<li>
A regular list
</li>
<li>
With regular items
</li>
</ul>
<blockquote>
It's amazing 👏
<br />
mom
</blockquote>
`, `,
}), }),
} }