tui.editor
tui.editor copied to clipboard
Repeat: How to use editor or viewes to publish checklist?
Note: I had already this question but it has lost the comment behind the comment mark, sorry.
Summary
The viewer (object viewer) allows check / uncheck checkboxes, which is great. But I didn't found how to get and store check modifications. getMarkdown method is not published in viewer but it really make sense for this case.
Is there a way how to download changes or somehow get information about the checklist status? Or can I set somehow set up editor to allow only checklists? However it does not make sense - there are may other elements to hide (toolbar etc.)
Screenshots
Version
All editors
Additional context
Editors are great, ... but checklists would be more usefull when it allows display them and modify.
@posel It seems that you want to know the state before and after when you click the marker (checkbox) of the task. In the current state, when the change
event is fired, I think you should check the marker state by fetching the markdown value and parsing it yourself.
const viewer = Editor.factory({
el: document.querySelector('#viewer'),
viewer: true,
events: {
change: ev => {
const content = editor.getMarkdown();
}
}
});;
But, as you said, there is no getMarkdown
API in the Viewer. This is a bug, so I'll fix it as soon as possible.
I know, how to read changes in editor and use it. But editor is not good to use only for checks - it enables everything.
Thank's for viewer update ! I'll glad for that because it significantly improves possibilities how to use it!
Would love to see this implemented! And also a way to prevent the checkboxes from being checked in the Viewer when you want it to be read only. Thanks!
But, as you said, there is no
getMarkdown
API in the Viewer. This is a bug, so I'll fix it as soon as possible.
Is there an estimation when getMarkdown will be implemented in the Viewer mode?