mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 19:57:52 +01:00
editor: do not replace newlines with br when pasting
This commit is contained in:
committed by
Abdullah Atta
parent
42d0d42188
commit
511c40db5c
@@ -17,11 +17,10 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { encodeNonAsciiHTML } from "entities";
|
||||
|
||||
export function convertBrToParagraph(html: string) {
|
||||
const doc = new DOMParser().parseFromString(
|
||||
convertNewlinesToBr(html),
|
||||
"text/html"
|
||||
);
|
||||
const doc = new DOMParser().parseFromString(html, "text/html");
|
||||
for (const br of doc.querySelectorAll("br")) {
|
||||
let paragraph = br.closest("p");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user