Get editor instance by id / Get all editor instances
See original GitHub issueVersion
1.4.6
Test Environment
Mac OS, Version: 76.0.3809.100
I’m using jquery to centrally initialize all the editors on the page like shown in the code below
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js"></script>
<link rel="stylesheet" href="https://uicdn.toast.com/tui-editor/latest/tui-editor.css"></link>
<link rel="stylesheet" href="https://uicdn.toast.com/tui-editor/latest/tui-editor-contents.css"></link>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.33.0/codemirror.css"></link>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css"></link>
<script src="https://uicdn.toast.com/tui-editor/latest/tui-editor-Editor-full.js"></script>
<div id="editor_1" class="markdown-editor"></div>
<div id="editor_2" class="markdown-editor"></div>
<script language="JavaScript">
$(document).ready(function () {
$('.markdown-editor').each(function () {
var element = $(this);
var config = {
el: element.get(0),
initialEditType: 'wysiwyg',
initialValue: element.val(),
height: '300px'
};
var editor= new tui.Editor(config);
});
});
</script>
The editors are initialised perfectly well and function fine. Now is there anyway (any method available) that I can get the tui-editor instance corresponding to the div with id = editor_2. …so that I can wire up some event on it?
Also, is there any method to get a list/array of all editor instances initialised on the page?
Thanks
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
CKEditor 5 – get editor instances - Stack Overflow
It's possible to access the editor instance using the ckeditorInstance property which is available on the contenteditable element that CKEditor ...
Read more >How can I get the editor instance? - Froala
Getting the editor instance can be done in JS inside the initialized event like below. var editor = new FroalaEditor('selector', { events: {...
Read more >Retrieve CKEDITOR.editor instance by div's 'id' attribute
I'm a newbie with CkEditor 3.1, and trying to make it work in a Vaadin+GWT environment, which is more Java than javascript oriented....
Read more >Get TinyMCE editor instance by element selector
Target the active editor. Get the element by the textarea tag id (so your text area tag will need an id if it...
Read more >How to get the Class or Instance of a Custom Editor of a ...
Hi all, I'm working around to customize a context menu if you right-click on a game object in the hierarchy window, by using......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@jaydeepk I understand! It would be nice to have a function like
getInstanceById. I’ll consider adding this API and let you know when it’s decided. Thanks.Is the
getInstancesmethod removed from the current version? How can we do this now?