Html Editor Widget event

Uldis
Member
Hi
I'm using the following code to load Wiki content in Smart View.
It kind of works, but I have doubts about fetch().done method. I need to be able to know when the full content of wiki is loaded so I can run another function GetAllWikiHTML.
In some cases GetAllWikiHTML does not have all the wiki content.
Are there other ways to make sure wiki content is fully loaded? and how to get it.
Here is the current code
const WikiDataID = 222222; var modulesToLoad1 = ['csui/lib/marionette','csui/utils/contexts/page/page.context','csui/widgets/html.editor/html.editor.view',"csui/utils/contexts/factories/connector" ]; if (csui.onReady3) { csui.onReady3({ connection: serverConnection },modulesToLoad1, ShowWidget, handleError); } function ShowWidget(Marionette, PageContext, HtmlEditorView,ConnectorFactory) { var pageContext = new PageContext(), connector = pageContext.getObject(ConnectorFactory); connector.authenticator.updateAuthenticatedSession({ ticket: xxxxxx }); var htmlEditorView = new HtmlEditorView({ title:false, context: pageContext, id: WikiDataID }), htmlEditorRegion = new Marionette.Region({ el: "#wikicontent" }); htmlEditorRegion.show(htmlEditorView); pageContext.fetch().done(function() { console.log("Wiki content fully loaded ???? "); GetAllWikiHTML(); }); }
Thanks
Uldis
0
Categories
- All Categories
- 124 Developer Announcements
- 54 Articles
- 156 General Questions
- 155 Thrust Services
- 56 Developer Hackathon
- 38 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9.1K Extended ECM
- 920 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 35 eDOCS
- 195 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 11 XM Fax
- Follow Categories