On load/initialize Tinymce editor shows wordcount as 0 even if editor contains text - tinymce

In Tinymce editor trying to show the wordcount and it works also. But on loading the editor the word count is shown as 0 even if it contains text. How to show the actual word count when editor loads or initialize.

Related

VSCode tab-less editor background

How do I change what is shown in the space normally occupied by the editor when there are no open tabs? I mean the space with the gray-er blue and the VSCode icon, in the attached screenshot
It should appear somewhere in the Theme reference but I'm failing to find it.
Edit: I was expecting a var like editor.emptyStateBackground, being editor and background the main keywords, but there is nothing in the reference that allows to update this using any of those keywords.

Can I write a vscode extension to open a file (from explorer panel) directly in webview?

The behavior I want is that when I click on a file (of certain extension) in the explorer panel, instead of opening a text editor, a webview shows up. An example would be that when I open a .md file, instead of showing the markdown text, a custom made WYSIWYG markdown editor (webview) is shown directly.
I managed to open the webview via command and I even hooked it up to the onDidChangeActiveTextEditor and onDidOpenTextDocument events so that whenever a text editor is opened or focused, the corresponding webView is opened and focused immediately.
This almost does what I want, with two issues. One is that the text editor still shows up for a moment. Second, and more problematic, the webview does not sync with the explorer panel as well as the text editor does. For instance, when a text editor is focused, the corresponding file is selected in the explorer panel. The webview doesn't do that.
Is there a way to make the webview the default and primary editor for a type of document?
This is not possible as of VS Code 1.30. These issue are tracking something similar: https://github.com/Microsoft/vscode/issues/12176 and https://github.com/Microsoft/vscode/issues/22068

Paste content from the clipboard automatically when I open the TinyMCE editor

I am trying to paste the content from the clipboard automatically when I open the tinyMce Editor.
I have already used-
var a=window.clipboardData.getData("Text");
tinymce.get("id1").setContent(a);
but unable to get the content on the editor, but able to get it in the alert on IE(only)
however when i use
tinymce.get("id1").setContent('a');
I can get the content 'a' on the editor.
Please suggest.

TinyMCE: How do I setup the editor to start in plain text mode by default?

So far when I open the page where the editor is, it starts in wysiwyg mode. I want to change that so the plain text mode is shown on start. How would I do that?
Thanks!
Remove the editor instance when the page opens so that it opens in plain
text mode.
You can add it later on.
Here is a DEMO

JQueryUI Dialog TinyMCE Issues

i am having some problems with the TinyMCE (V3.4.7) and JqueryUI (V1.8.14) Dialog
the following Fiddler link shows my example purfectly here
What i am trying to do is open a JqueryUI Dialog box with a TinyMCE WYSIWYG Editor in it.
the first time it displays properly. but if you click close and then reopen the box it will not show the Editor but just the TextArea.
Any help would be good. Thanks
Update
I did find out a solution that works for me, i have put up the working code here
What i am doing is check to see if the dialog has been opened before and if so just open it, then in the Open Function i test to see if the box contains an element with id_parent
if it does then this will be the editor (so do nothing) otherwise just init as usual.
it seems there is a problem with the JQuery Plug in as it does not remove the elements when you call tinyMCE.execCommand('mceRemoveControl',false,'editor_id') and when you re-add the editor it attaches to the first box available.
Problem here is that you need to shut down tinymce correctly in order to open an editor with the same id.
Use:
ed.execCommand('mceRemoveControl', false, 'editor_id');// editor_id equals the id of your textarea