S
S
saalaus2018-07-25 23:59:52
JavaScript
saalaus, 2018-07-25 23:59:52

How does formatBlock work in document.execCommand?

How does document.execCommand(formatBlock, false, 'h1') work? Why does it wrap the entire section of text in this tag, and not the selected one? How can I make the tag wrap only the selected text?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viva8888, 2020-07-07
@BMinhoj

<form name="compForm" onsubmit="if(validateMode()){this.myDoc.value=oDoc.innerHTML;return true;}return false;">

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question