Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

public setUnlock(selector: String)

DOM selector를 지정하여 편집을 허용합니다.

문서 전체에 편집을 제한하고 일부분만 편집을 허용할때 유용합니다.

적용시 unlock아이콘'It specifies the DOM selector to allow editing.
It is useful when limiting editing of the entire document and allowing only partial editing.
When applied, it is displayed as an unlock icon (

HTML
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="16px"
    height="16px" viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
   <rect x="6.041" y="13.005" fill="#596468" width="10" height="1.995"/>
   <rect x="6.041" y="10.057" fill="#39B6B8" width="10" height="1.996"/>
   <rect x="6.041" y="7.051" fill="#596468" width="10" height="1.996"/>
   <path fill="#596468" d="M0.916,4.312v0.191c0,0.264,0.214,0.476,0.477,0.476c0.269,0,0.481-0.212,0.481-0.476V4.312
       c0-1.682,1.423-2.269,3.097-2.359c1.689-0.091,3.06,1.361,3.06,3.448v2.802h0.958V5.401C8.989,2.789,7.191,1,4.971,1
       C2.753,1,0.916,2.105,0.916,4.312L0.916,4.312z"/>
</svg>

)으로 표현됩니다.


편집 허용 대상Allowed to edit

  • DIV
    • Elements with "se-contents" , and "se-div" 클래스가 지정된 Elementclasses specified
  • TABLE
  • TD
  • TH


Params: selector

NameTypeDescription
selectorstring편집을 허용할 DOM을 가져올 selectorSelectors to import the DOM to limit editing

Example:

Code Block
languagejs
themeEmacs
window.editor.setUnlock('#unlock_element_Id');
window.editor.setUnlock('.editable');

소스보기

...


Source View

You can add 'se-unlock' 클래스를 추가하여 적용 할 수 있습니다class to the applied element in the Source View Mode of the editor.


체험하기

Include Page
DEMO:부분 편집 제한
DEMO:부분 편집 제한