<?php $__env->startPush('styles'); ?>
<link rel="stylesheet" href="<?php echo e(asset('assets/css/editor.css')); ?>">
<?php $__env->stopPush(); ?>

<div class="editor-container">
    <div class="toolbar">
        <div class="toolbar-group">
            <button onclick="formatText('bold')" title="پررنگ"><strong>B</strong></button>
            <button onclick="formatText('italic')" title="مورب"><em>I</em></button>
            <button onclick="formatText('underline')" title="زیرخط"><u>U</u></button>
        </div>

        <div class="toolbar-group">
            <button onclick="formatText('insertOrderedList')" title="لیست شماره‌ای">
                <svg fill="#000000" width="25px" height="25px" viewBox="0 0 36 36" version="1.1" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
                    <polygon points="5.46 7.41 5.46 11.56 6.65 11.56 6.65 6.05 5.7 6.05 4.05 7.16 4.52 8 5.46 7.41" class="clr-i-outline clr-i-outline-path-1"></polygon>
                    <path d="M5.57,14.82a.76.76,0,0,1,.83.73c0,.38-.21.74-.87,1.27l-2,1.57v1H7.67V18.28H5.33l1-.77c1-.7,1.28-1.27,1.28-2a1.83,1.83,0,0,0-2-1.76,2.63,2.63,0,0,0-2.14,1.08l.76.73A1.75,1.75,0,0,1,5.57,14.82Z" class="clr-i-outline clr-i-outline-path-2"></path>
                    <path d="M6.56,24.64a1.32,1.32,0,0,0,1-1.27c0-.87-.78-1.51-2-1.51a2.61,2.61,0,0,0-2.1,1l.69.72a1.78,1.78,0,0,1,1.3-.64c.54,0,.92.26.92.66s-.36.62-1,.62H4.79v1h.64c.74,0,1.07.21,1.07.63s-.35.68-1,.68a2,2,0,0,1-1.46-.65l-.7.78a2.85,2.85,0,0,0,2.21.93c1.29,0,2.13-.69,2.13-1.64A1.33,1.33,0,0,0,6.56,24.64Z" class="clr-i-outline clr-i-outline-path-3"></path>
                    <path d="M32.42,9a1,1,0,0,0-1-1H10v2H31.42A1,1,0,0,0,32.42,9Z" class="clr-i-outline clr-i-outline-path-4"></path>
                    <path d="M31.42,16H10v2H31.42a1,1,0,0,0,0-2Z" class="clr-i-outline clr-i-outline-path-5"></path>
                    <path d="M31.42,24H10v2H31.42a1,1,0,0,0,0-2Z" class="clr-i-outline clr-i-outline-path-6"></path>
                    <rect x="0" y="0" width="36" height="36" fill-opacity="0" />
                </svg>
            </button>
            <button onclick="formatText('insertUnorderedList')" title="لیست نقطه‌ای">
                <svg fill="#000000" width="25px" height="25px" viewBox="0 0 1920 1920" xmlns="http://www.w3.org/2000/svg">
                    <path d="M169.412 1355.412c93.402 0 169.412 76.01 169.412 169.412s-76.01 169.411-169.412 169.411C76.009 1694.235 0 1618.225 0 1524.824c0-93.403 76.01-169.412 169.412-169.412ZM1920 1468.352v112.942H564.706v-112.941H1920ZM169.412 790.707c93.402 0 169.412 76.01 169.412 169.412s-76.01 169.411-169.412 169.411C76.009 1129.53 0 1053.52 0 960.118c0-93.403 76.01-169.412 169.412-169.412ZM1920 903.647v112.941H564.706v-112.94H1920ZM169.412 226c93.402 0 169.412 76.01 169.412 169.412s-76.01 169.412-169.412 169.412C76.009 564.824 0 488.814 0 395.412 0 302.009 76.01 226 169.412 226ZM1920 338.941v112.941H564.706v-112.94H1920Z" fill-rule="evenodd" />
                </svg>
            </button>
        </div>

        <div class="toolbar-group">
            <button onclick="formatText('justifyRight')" title="راست‌چین">
                <svg width="25px" height="25px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none">
                    <g stroke="#000000" stroke-linecap="round" stroke-width="2">
                        <path d="M4 6h16" />
                        <path d="M7 10h13" />
                        <path d="M4 14h16" />
                        <path d="M14 18h6" />
                    </g>
                </svg>
            </button>
            <button onclick="formatText('justifyCenter')" title="وسط‌چین">
                <svg width="25px" height="25px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none">
                    <g stroke="#000000" stroke-linecap="round" stroke-width="2">
                        <path d="M4 6h16" />
                        <path d="M7 10h10" />
                        <path d="M4 14h16" />
                        <path d="M9 18h6" />
                    </g>
                </svg>
            </button>

            <button onclick="formatText('justifyLeft')" title="چپ‌چین">
                <svg width="25px" height="25px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none">
                    <g stroke="#000000" stroke-linecap="round" stroke-width="2">
                        <path d="M4 6h16" />
                        <path d="M4 10h13" />
                        <path d="M4 14h16" />
                        <path d="M4 18h5.5" />
                    </g>
                </svg>
            </button>
        </div>

        <div class="toolbar-group">
            <select onchange="formatText('fontSize', this.value)" class="font-size-select" title="اندازه فونت">
                <option value="">اندازه فونت</option>
                <option value="1">خیلی کوچک</option>
                <option value="2">کوچک</option>
                <option value="3">متوسط</option>
                <option value="4">بزرگ</option>
                <option value="5">خیلی بزرگ</option>
                <option value="6">بزرگ‌تر</option>
                <option value="7">بزرگترین</option>
            </select>
        </div>
    </div>

    <div id="editor" class="editor" contenteditable="true">
        <?php if(isset($text) && $text != null): ?>
            <?php echo $text; ?>

        <?php elseif(isset($info) && $info != null): ?>
            <?php echo $__env->make('layouts.contract', $info, \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
        <?php else: ?>
            متن خود را اینجا تایپ کنید...
        <?php endif; ?>
    </div>

    <div class="footer">
        در این بخش میتوانید متن خود را ویرایش کنید
    </div>
</div>

<?php $__env->startPush('scripts'); ?>
<script src="<?php echo e(asset('assets/js/editor.js')); ?>"></script>
<?php $__env->stopPush(); ?><?php /**PATH /home1/zarborji/public_html/resources/views/layouts/editor/editor.blade.php ENDPATH**/ ?>