<?php
defined('_JEXEC') or die('Restricted access');
?>

<!-- Editor Modal -->
<div class="modal fade" id="editor-modal" tabindex="" role="dialog" aria-labelledby="editor-modalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
        <h4 class="modal-title" id="layout-modalLabel"><?php echo cck_lang_text("COM_OS_CCK_EDIT_LAYOUT_MODAL_EDITOR_TITLE")?></h4>
      </div>
      <div class="modal-body">
      
        <textarea id="editor-area" name="cckEditor" style="display:none;"></textarea>
        <div class="joomla-editor">
          <script>var joomlaEditor = true;</script>
          <?php $editor = JFactory::getConfig()->get('editor');
 
          if($editor != "codemirror" && $editor != 'none'){
            $editor = JEditor::getInstance($editor);
            echo $editor->display( 'cckEditor', '', '98%', '500', '5', '5');
          }else{ ?>
            <script>
              joomlaEditor = false;
            </script>
            <?php
          }?>
        </div>
        <div class="url-helper-notice">
            <?php echo cck_lang_text("COM_OS_CCK_LABEL_CUSTOM_CODE_MASKS_DESC")?>
        </div>
      </div>
<!--      <br>-->
      <div class="modal-footer">
        <button class="btn btn-default" data-dismiss="modal" type="button">Close</button>
        <button class="btn btn-primary save-editor-button" 
                type="button">
                  Save
        </button>
      </div>
    </div>
  </div>
</div>
<!-- Editor Modal -->
