pastHTMLλ‘ HTML contentλ₯Ό μ½μ
μμ
κ°
νκ·Έ μ¬μ΄μ <p><br></p> κ° μΆκ°λ‘ μ½μ
λ©λλ€.
κ·Έλμ κ²°κ³Όμ μΌλ‘λ μλ λ΄μ© μ¬μ΄μ¬μ΄μ new lineμ΄ μκΈ°κ² λ©λλ€.
$('[data-provider="summernote"]').each(function () {
$summernote = $(this).summernote({
toolbar: [
['style', ['style']],
['font', ['bold', 'underline', 'clear']],
['fontname', ['fontname']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['table', ['table']],
['insert', ['link', 'picture']],
['view', ['fullscreen', 'codeview', 'help']],
],
lang: 'ko-KR',
height: 300, // set editor height
minHeight: null, // set minimum height of editor
maxHeight: null, // set maximum height of editor
focus: true, // set focus to editable area after initializing summernote
callbacks: {
onChange: function (contents, $editable) {
// console.log(contents);
$(this).val(contents);
},
onInit: function () {
console.log($(this).val());
}
}
});
$summernote.summernote('pasteHTML', $(this).val());
});
$summernote.summernote('pasteHTML', $(this).val());μ ν΄λΉνλ λ΄μ©.
<p><span style="font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 1.75rem;">adfa</span><br></p><p><span style="font-size: 1rem;">μ΄κ±°μ¨ 곡μ§μ¬</span><br></p><p><img src="http://twg.beta.tset.daumcdn.net/blockadmintest/funding_test/91/79/9179833acb14a88dbd804f09265a622c.jpg" style="font-size: 1rem;"><br></p>
κ²°κ³Ό
<p><br></p><p><span style="font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 1.75rem;">adfa</span><br></p><p><br></p><p><span style="font-size: 1rem;">μ΄κ±°μ¨ 곡μ§μ¬</span><br></p><p><br></p><p><img src="http://twg.beta.tset.daumcdn.net/blockadmintest/funding_test/91/79/9179833acb14a88dbd804f09265a622c.jpg" style="font-size: 1rem;"><br></p><p><br></p>
v0.8.12 λ²μ μλ μμ§ μλ PRμ΄ ν¬ν¨λμ΄μμ§ μμμ pastHTMLν λ μμκ° λ°λλ‘ λ€μ§νμ λΆμ¬μ§κ² λ©λλ€. μλ μ¬νμ ν¬ν¨ν λ²μ μ μ¬λ €μ£Όμλ©΄ μ λ§ κ°μ¬νκ² μ΅λλ€. :)
https://github.com/summernote/summernote/pull/3325
This can help find and resolve any issues.
@suya55
μ€λ°κΏμ΄ μλμΌλ‘ λ€μ΄κ°λ λ¬Έμ μ λν΄μ νμΈ μ€μ μμ΅λλ€.
μμ λλ©΄ μλ €λλ¦¬κ² μ΅λλ€.
μΌλ¨ PR μ λ§λ€μ΄μ μ¬λ Έμ΅λλ€. μ½μ΄ λΆλΆμ κ³ μ³μΌ νλκ² μμ΄μ ν μ€νΈκ° μ’ λ νμν μν©μ λλ€. Merge λλ©΄ λ€μ λ§μ λ릴κ²μ.
v0.8.14 κ° λ¦΄λ¦¬μ¦ λμ΅λλ€. μ΄ λ²μ μ μ¬μ©ν΄μ£ΌμΈμ.