12345678910111213141516171819202122232425262728293031323334353637 |
- function startEditors(){
- let element_visual = document.getElementById("visual-editor");
- if(element_visual !== null) {
- start_visual_editor(element_visual);
- }
- }
- function start_visual_editor(element){
- let options = {
- "clear_button": true,
- "link": true,
- "heading": true,
- "list": true,
- "table": true,
- "image": true,
- "block": true,
- "code": true,
- "embed": true,
- "save": true,
- "load": true
- };
- visual_editor = new creta('visual-editor', element, options);
- let div = document.createElement('div');
- div.innerHTML += `<div id="error-ui" class="popup overflow-popup" style="display:none;">
- <div id="text_error">Write container class</div>
- <div class="close_button" onclick="this.parentElement.parentElement.style.display = 'none';">🗙</div>
- </div>`;
-
- visual_editor.add_ui_element(element, div);
-
-
- }
|