tinymce-4

How to upload and inject image to tinymce 4 using Asp.net MVC

北城余情 提交于 2021-02-17 13:59:03
问题 So because there is absolutely no modern way of uploading images to tinymce in .net for free , I was thinking of maybe adding a file upload input in html then upload it to server using ajax and then include the file in tinymce editor. The problem is injecting image to tinymce, I don't know how to... Is there any way? 回答1: Ok, Micro$oft or someone else needs to really do something about this, in the mean time here is the result of hours of debugging: This solution uses direct upload function

How to upload and inject image to tinymce 4 using Asp.net MVC

北战南征 提交于 2021-02-17 13:57:12
问题 So because there is absolutely no modern way of uploading images to tinymce in .net for free , I was thinking of maybe adding a file upload input in html then upload it to server using ajax and then include the file in tinymce editor. The problem is injecting image to tinymce, I don't know how to... Is there any way? 回答1: Ok, Micro$oft or someone else needs to really do something about this, in the mean time here is the result of hours of debugging: This solution uses direct upload function

How to toggle browser_spellcheck dynamically in tinymce

我怕爱的太早我们不能终老 提交于 2021-02-11 13:38:21
问题 I've a custom toolbar button, which is used to toggle the browser's spell check. I've used browser_spellcheck : true in the initialization. Now if we press button, then i need to 'off' the spell check. So, how can we set browser_spellcheck to false dynamically? 回答1: You cannot change the init settings of TinyMCE dynamically - it simply does not allow that to happen. If you need to change a setting like this you would need to use the remove() and init() APIs to reload the editor with new

Tinymce get image _description with file_picker_callback and image uploader

那年仲夏 提交于 2021-02-10 06:39:27
问题 TL:DR I am trying to get the value of image_description field using javascript to past it my post xhr request Original question below I am using file_picker_callback type image https://www.tinymce.com/docs/configure/file-image-upload/#file_picker_callback I enabled image_description input field in my tinymce.init({ ...., image_description: true, ... Everything is uploading fine but I want to pass the image_description field as well to store in the DB. But i can't grab the data Here are my two

How to highlight sentences in TinyMCE like this?

半腔热情 提交于 2021-01-29 02:38:22
问题 Edit 18th november 2016 I'm trying to mark / highlight long sentences (above 16 words) in a TinyMCE editor. This is my best bet so far using mark.js and TinyMCE editor The HTML is quite plain: <div id="myTextArea" contenteditable="true"> Put whatever random text you want and as long as it is above 16 words per dot separated sentence it should also mark the text. </div> JavaScript looks like this at the moment: tinymce.init({ selector: '#myTextArea', height: 300, init_instance_callback :

How to highlight sentences in TinyMCE like this?

北战南征 提交于 2021-01-29 02:34:58
问题 Edit 18th november 2016 I'm trying to mark / highlight long sentences (above 16 words) in a TinyMCE editor. This is my best bet so far using mark.js and TinyMCE editor The HTML is quite plain: <div id="myTextArea" contenteditable="true"> Put whatever random text you want and as long as it is above 16 words per dot separated sentence it should also mark the text. </div> JavaScript looks like this at the moment: tinymce.init({ selector: '#myTextArea', height: 300, init_instance_callback :

Tinymce insert/edit image fields on pop up are not editable(focused) inside vuetify's dialog

删除回忆录丶 提交于 2020-12-10 08:45:28
问题 I am aware with the tweaks required for enabling focus inside the tinymce pop up when in bootstrap modal. But currently I am working with a vuetify dialog. Which does'nt seem to focus the pop up fields of tinymce. I have gone through this question but it does not work in context to vuetify TinyMCE 4 links plugin modal in not editable Below is my code I have removed some methods just for clean up and have kept basic things that I have tried in mounted event & editor init. <no-ssr placeholder=

Add properties to TinyMce after init()?

独自空忆成欢 提交于 2020-05-29 07:18:51
问题 Consider the initialization: function initMyTinymce() { tinymce.init({ selector: $(this).attr("id"), directionality: "ltr", }); } Is it possible to add properties to tinyMCE after init() ? For example: plugins: "link,code,textcolor", relative_urls: false, convert_urls: false, remove_script_host: false I'm using TinyMce 4.1.6 (2014-10-08). 回答1: Yes, this is possible, but parameters that get red on initialisation only won't have an impact if they get set later on. Example: To change the

TinyMCE stacks classes

邮差的信 提交于 2020-03-03 07:44:53
问题 I'm using TinyMCE 4 as my default editor. In the config I specified style formats. This works excuistly except for one thing: it stacks classes. My style format: style_formats: [ { title: 'Heading 2', block: 'h2', classes: 'heading-02' }, { title: 'Heading 3', block: 'h3', classes: 'heading-03' }, { title: 'Heading 4', block: 'h4', classes: 'heading-04' }, { title: 'Heading 5', block: 'h5', classes: 'heading-05' }, { title: 'Text', block: 'p', classes: 'copy-02' }, ], After selecting text and