简体   繁体   English

CKEditor下的添加按钮不可见

[英]Add button under CKEditor is not visible

I have used CKEditor django plugin in my form modal .我在我的表单 modal 中使用了CKEditor django 插件 But when i try to show ADD button below the CKEditor, the button doesn't appear in the UI at all.但是当我尝试在 CKEditor 下方显示 ADD 按钮时,该按钮根本没有出现在 UI 中。

As shown in the below image, I have currently kept the Add button on the top of the CKEditor text box as its not appearing when placed at the bottom.如下图所示,我目前将“添加”按钮保留在 CKEditor 文本框的顶部,因为它放在底部时不会出现。

在此处输入图片说明

Below is the HTML code snippet下面是 HTML 代码片段

   <div class="row">
              <div class="col-md-12">
                <div class="form-group">
                  <label for="">Driver Name</label>
              <input type="text" class="form-control" name="dn" id="dnn" required="True" />
            </div>

            <div class="form-group">
              <label for="st">Driver Description</label>
              <textarea name="editor1" id="editor1"></textarea>
              <script>
                  CKEDITOR.replace( 'editor1' );
              </script>
            </div>
            <div class="modal-footer">
              <button type="submit" class="btn btn-primary up">
                ADD
              </button>
            </div>

          </div>
   </div>

<script src="https://cdn.ckeditor.com/4.5.6/standard/ckeditor.js"></script>

Can someone please suggest how to make the add button make it appear below ckeditor.有人可以建议如何使添加按钮出现在ckeditor下方。

If you are using Bootstrap 4, You can use the Order feature if your elements are wrapped inside a flex container.如果您使用的是 Bootstrap 4,并且您的元素被包裹在 flex 容器中,则您可以使用Order功能。

Your code should look similar to this:您的代码应该类似于:

<div class="row">
  <div class="d-flex">
    <div class="col-md-12">

      <div class="form-group">
        <label for="">Driver Name</label>
        <input
          type="text"
          class="form-control"
          name="dn"
          id="dnn"
          required="True"
        />
      </div>

      <div class="form-group">
        <label for="st">Driver Description</label>
        <textarea name="editor1" id="editor1"></textarea>
        <script>
          CKEDITOR.replace("editor1");
        </script>
      </div>

      <div class="modal-footer order-1">
        <button type="submit" class="btn btn-primary up">
          ADD
        </button>
      </div>

    </div>
  </div>
</div>

<script src="https://cdn.ckeditor.com/4.5.6/standard/ckeditor.js"></script>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM