ویرایشگر سان
ویرایشگر استاندارد
Huro با ویرایشگر سان عرضه میشود، یک متن غنی «vanillajs». جایگزین ویرایشگر میتوانید در ویرایشگر 'sun' و همه موارد موجود بیشتر بخوانید گزینه های سفارشی سازی "اینجا". مثال زیر یک ویرایشگر استاندارد sun را نشان می دهد نمونه، مثال.
//JS CODE
const editor = SUNEDITOR.create((document.getElementById('sun-editor') || 'sun-editor'), {
width: '100%',
height: 250,
placeholder: 'Write your text here...'
});
//MARKUP
<textarea id="sun-editor" placeholder="Write your text here..."></textarea>
Balloon Editor
ویرایشگر سان can be used with a more minimal UI configuration where the toolbar appears
only when you focus the textarea. It can be very useful to keep your layouts clean.
In order to do this simply use the mode:'balloon-always'
in your JS
configuration. Check the code exqmple for more details about usage.
//JS CODE
const editor = SUNEDITOR.create((document.getElementById('sun-editor-balloon') || 'sun-editor-balloon'), {
width: '100%',
height: 250,
placeholder: 'Write your text here...',
mode: 'balloon-always'
});
//MARKUP
<textarea id="sun-editor-balloon" placeholder="Write your text here..."></textarea>