profile
viewpoint

Ask questionsViewer not working with CDN

<!-- Thank you for your contribution.

When writing an issue, please, use the template below. It's mandatory to use the template for submitting the new issue. We don't reply to the issue not following the template. -->

<!-- BUG ISSUE TEMPLATE -->

Current Behavior

<!-- Write steps to reproduce the current behaviour in detail. You can add sample code, 'CodePen' or 'jsfiddle' links. --> When doing:

var editor = new tui.Viewer({
           el: document.querySelector('#editSection'),
           height: '100px',
           initialValue: '# content to be rendered'
       });

Chrome console outputs:

tui.Viewer is not a constructor

This is what I am using for CDN:

<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>

Expected Behavior

<!-- Write a description for future action. --> The CDN should work for both editor and viewer.

nhn/tui.editor

Answer questions ZachTheDev

Changing my CDN to tui-editor-Viewer.js results in these two errors. Cannot read property 'Map' of undefined tui.Viewer is not a constructor

useful!
source:https://uonfu.com/
Github User Rank List