tinymce

How to add tinymce 4.x dynamically to textarea?

旧城冷巷雨未停 提交于 2019-12-10 15:33:19
问题 I have a little problem with adding tinymce dynamically to textarea after init. tinymce.init({ selector: "textarea", theme: "modern", height: 100, plugins: [ "advlist autolink image lists charmap print preview hr anchor pagebreak spellchecker", "link searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking", "save table contextmenu directionality emoticons template paste textcolor" ], toolbar: "insertfile undo redo | styleselect | bold italic |

Display tinymce textarea dynamically

一曲冷凌霜 提交于 2019-12-10 15:23:33
问题 I have a drop down list that when a selection is made will insert a bunch of elements within a form to the DOM using ajax, within this form I have textareas that I wish to be TinyMCE textareas. I have this inside of my HTML head: <script type="text/javascript"> tinymce.init({ selector: "textarea" }); </script> This is the ajax function that I use to add a bunch of elements, this is working how I need it to. function getSecFacility(facsecid, facid) { $("#new_section_form").hide(); $.ajax({

Open/Access WP Media library from tinymce plugin popup window

断了今生、忘了曾经 提交于 2019-12-10 14:47:38
问题 I'm building a tinymce button plugin for the Wordpress (4) editor. The popup window that my button opens displays a form with several fields. One of them is for selecting an image inside the WP media library. I can't figure how to achieve this. If that's not possible, what would be the best way to allow the user to select an image stored in the WP media library from a tinymce plugin popup window ? FYI, the tinymce plugin inserts a shortcode with an image src as an attribute. thanks ! 回答1: I

Options for HTML editing in JavaFX

纵饮孤独 提交于 2019-12-10 14:19:34
问题 I'm looking to replace an HTML editor used within a Swing based application with one based on JavaFX. As far as I can see, there are two possible options: 1) Use the JavaFX HTML editor. While this is quite nice for the features it does have, it is still lacking several other features (e.g. insert an image, insert a table, manipulate the image or table, etc.). I am also looking to include other features such as spellcheck and the ability to support custom tags. 2) Use the JavaFX WebView

TinyMCE with div tag?

二次信任 提交于 2019-12-10 14:17:16
问题 Below is my JSP code: <tr> <td colspan="2">custEmail</td> <td colspan="5"><div id= "custEmail"><p><strong>Test</strong></p></div></td> </tr> Below is the code attaching the div with TinyMCE Editor <script type="text/javascript" src="tinymce/tinymce.min.js"></script> <script type="text/javascript"> tinyMCE.init({ width : "640", mode : "exact", elements : "custEmail", theme : "advanced", plugins : "preview", readonly : true, theme_advanced_buttons1 : "forecolor,backcolor,|,justifyleft

Setting default font size and background color in TinyMCE

自闭症网瘾萝莉.ら 提交于 2019-12-10 13:48:42
问题 How can I set the default font size and the background color in TinyMCE? Thanks, Eden 回答1: You can change the css using Javascript also. Add this to your init function: oninit : "postInitWork", and function postInitWork() { tinyMCE.getInstanceById('textedit').getWin().document.body.style.backgroundColor='#FFFF66'; var dom = tinymce.activeEditor.dom; var pElements = dom.select('p'); // Default scope is the editor document. dom.setStyle(pElements, 'color', 'red'); } 回答2: Have you tried the

How to destroy tinyMce?

随声附和 提交于 2019-12-10 13:43:23
问题 I am using the latest version 3.4.b3. I have it in a dialog and it's contents are created dynamically. So this means the textarea that tiny should bind itself to gets created every single time. So when I load up the dialog for the first time tiny shows up. If I load up the dialog a second time the dialog does not show up again. So I think I need to destroy tiny on close of the dialog and then recreate it on load again. I tried to use remove but I get this error ReferenceError: t is not

TinyMCE 4 disable cleanup html

笑着哭i 提交于 2019-12-10 12:56:25
问题 How can I disable the automatic cleaning of HTML code in TinyMCE 4.x When I copy text from WORD, TinyMCE removes styles 回答1: This might not fix all your problem but this allowed me to be able to use all html tags and attributes, so it might be a step in right direction. tinyMCE.init({ // ... valid_elements : '*[*]', }); Edit : This worked better for me: tinyMCE.init({ // ... extended_valid_elements : '*[*]', }); 回答2: tinyMCE.init({ // ... cleanup : false, verify_html : false }); 回答3: You will

TinyMCE: How bind on event after its initialized

元气小坏坏 提交于 2019-12-10 12:53:55
问题 I already searched a lot but by google-fu 'ing don't get me any results :( I have an already initialized tinyMCE editor which initialization process I cannot control, so code like the following don't work at all: tinyMCE.init({ ... setup : function(ed) { ed.onChange.add(function(ed, l) { console.debug('Editor contents was modified. Contents: ' + l.content); }); } }); Code like the following doesn't work either since the jQuery tinymce plugin isn't defined: $('textarea').tinymce({ setup:

Plain and Rich text editor options in TinyMce editor

旧街凉风 提交于 2019-12-10 11:39:04
问题 I am using the tinymce editor to give a good look of textarea where user write some comments. I want to give him two options: one is plain text and the other is a rich text editor option. When the user clicks on plain text option all rich text option removed and when user click on rich text it will get all options of formatting text. I want to do this in TinyMce Editor. Is there anyone know how to implement it? I am searching from last 6 days how to implement this but i am failed to get any