홈빌드




그누보드 나리야빌드 기본 에디터 링크복사 버튼 만들기 ( 현재 사용중인 스킨 입니다)

♨ 카랜더 일정 :
  • 링크

  • 첨부
    등록일 2021.06.06 18:23

  • 컨텐츠 정보

    본문

    그누보드 나리야빌드 기본 에디터 링크복사 버튼 만들기 ( 현재 사용중인 스킨 입니다)

    3232235521_1622970997.4371.png

    1.버튼 추가 함수

    <a onclick="CopyLink()" i class="btn btn-primary py-2" role="button" class="fa fa-windows" span class="hidden-xs"> <i class="fa fa-link"></i> 링크복사</span></i></a>&nbsp;&nbsp;

    을 아래에 추가 합니다.

    <hr class="hr"/>
    <!-- 공유용 새창으로 내용수정하기 목록 버튼 끝 -->
            <!-- 그누보드 나리야빌드  새창으로 보기 / 글쓰기 / 글수정 / 목록으로 버튼 추가 11q.kr 20210602 추가 시작-->
    <div class="px-3 px-sm-0">
            <div class="row mx-n2">
                <a href="<?php echo $_SERVER[REQUEST_URI]; ?>" target="_blank"  onclick="window.open('<?php echo $_SERVER[REQUEST_URI]; ?>', '새창으로보기'); "><i class="btn btn-primary py-2"><i class="fa fa-windows"></i><span class="hidden-xs"> 새창으로보기</span></i></a>&nbsp;&nbsp;
                <a href="<?php echo $write_href ?>" i class="btn btn-primary py-2" role="button" class="fa fa-windows" span class="hidden-xs"> <i class="fa fa-pencil fa-md"></i> 글쓰기</span></i></a>&nbsp;&nbsp;
                <a href="<?php echo $update_href ?>" i class="btn btn-primary py-2" role="button" class="fa fa-windows" span class="hidden-xs"> <i class="fa fa-plus"></i> 글수정</span></i></a>&nbsp;&nbsp;
                <a href="<?php echo $list_href ?>" i class="btn btn-primary py-2" role="button" class="fa fa-windows" span class="hidden-xs"> <i class="fa fa-bars"></i> 목록으로</span></i></a>&nbsp;&nbsp;
                <a onclick="CopyLink()" i class="btn btn-primary py-2" role="button" class="fa fa-windows" span class="hidden-xs"> <i class="fa fa-link"></i> 링크복사</span></i></a>&nbsp;&nbsp;
            </div>
        </div>
        <!-- </button><button onclick="CopyLink()">Link Copy</button> -->
        <!-- 하단에 링크복사는 필수 스크립트 포함 합니다. -->
            <!-- 그누보드 나리야빌드 새창으로 보기 / 글쓰기 / 글수정 / 목록으로 버튼 추가 11q.kr 20210602 추가 끝-->

    2.일반 버튼및 스크립트 함수 내용 

    다음에 추가하세요

    W:\www\skin\board\11q_kr_pdf_viewer_skin_board\view.skin.php


    <!-- 하단에 링크복사는 필수 스크립트 포함해야 합니다. 시작-->
    <!-- https://stackoverflow.com/questions/37308210/copy-current-url-button-javascript -->
    <!-- </button><button onclick="CopyLink()">Link Copy</button> -->
    <script>
    // -----------------------
        // 상단에 링크복사는 필수 스크립트 포함 합니다.끝 
    function copyTextToClipboard(text) {
      var textArea = document.createElement("textarea");

      //
      // *** This styling is an extra step which is likely not required. ***
      //
      // Why is it here? To ensure:
      // 1. the element is able to have focus and selection.
      // 2. if element was to flash render it has minimal visual impact.
      // 3. less flakyness with selection and copying which **might** occur if
      //    the textarea element is not visible.
      //
      // The likelihood is the element won't even render, not even a flash,
      // so some of these are just precautions. However in IE the element
      // is visible whilst the popup box asking the user for permission for
      // the web page to copy to the clipboard.
      //

      // Place in top-left corner of screen regardless of scroll position.
      textArea.style.position = 'fixed';
      textArea.style.top = 0;
      textArea.style.left = 0;

      // Ensure it has a small width and height. Setting to 1px / 1em
      // doesn't work as this gives a negative w/h on some browsers.
      textArea.style.width = '2em';
      textArea.style.height = '2em';

      // We don't need padding, reducing the size if it does flash render.
      textArea.style.padding = 0;

      // Clean up any borders.
      textArea.style.border = 'none';
      textArea.style.outline = 'none';
      textArea.style.boxShadow = 'none';

      // Avoid flash of white box if rendered for any reason.
      textArea.style.background = 'transparent';


      textArea.value = text;

      document.body.appendChild(textArea);

      textArea.select();

      try {
        var successful = document.execCommand('copy');
        var msg = successful ? 'successful' : 'unsuccessful';
        console.log('Copying text command was ' + msg);
      } catch (err) {
        console.log('Oops, unable to copy');
      }

      document.body.removeChild(textArea);
    }

    function CopyLink() {
      copyTextToClipboard(location.href);
    }
        // 상단에 링크복사는 필수 스크립트 포함 합니다.끝 
    // ==========================

    ■ ▶ ☞ 정보찾아 공유 드리며 출처는 링크 참조 바랍니다 ♠ . ☞ 본자료는 https://11q.kr 에 등록 된 자료 입니다♠.

    [이 게시물은 11qkr님에 의해 2021-06-16 02:45:16 11.Nas_1에서 이동 됨]
    [ 추가 정보 ... 더보기) ]
    뷰PDF 1,2



    office view

    관련자료

    댓글목록

    등록된 댓글이 없습니다.




    ♥간단_메모글♥


    최근글


    새댓글



    PHP 안에 HTML ☞ 홈페이지 화면갱신 시간은 ♨
    ▶ 2024-04-18 22:00:18

    오늘의 홈 현황


    • 현재 접속자♨ 172 명
    • 오늘 가입자※ 5 명
    • 어제 가입자※ 3 명
    • 주간 가입자※ 14 명
    • 오늘 방문자 1,955 명
    • 어제 방문자 1,793 명
    • 최대 방문자 13,042 명
    • 전체 방문자 4,276,510 명
    • 전체 게시물※ 8,521 개
    • 전체 댓글수※ 24,481 개
    • 전체 회원수 10,910 명

    QR코드


    ☞ 사진기로 촬영하시면 방문링크 됩니다

    알림 0








    최신글↑