tinymce

Detecting tinyMCE textareas with JQUERY

会有一股神秘感。 提交于 2019-12-13 16:21:12
问题 On some of our forms we convert our textareas over to tinyMCE textareas. How can I tell in jquery if a given textarea has been converted? I've notice that tinyMCE will change the display of my original textarea to none upon init and then creates an adjacent span with a class of mceEditor, but the follow jquery statements never seems to find it. if ( $(formElm).siblings("span .mceEditor").size() > 0) { ...do this}; or if( $(formElm).parent().find("span .mceEditor").length > 0 ) {...do this};

TinyMCE when adding bullets the bullets do not show in front end/view

徘徊边缘 提交于 2019-12-13 16:12:52
问题 I have a website where bullets are automatically hidden in list elements <ul> <li>aSASa</li> <li>ASDDAS</li> <li>SADASD</li> </ul> Now I wonder if it's possible when adding a bullet using TinyMCE to automatically add a class on inline style to the list element that will enable bullts to show eg. insteas of just adding <ul> timnymce should add <ul style="list-style-type:circle;"> 回答1: Yes this is possible. You will need to figure out on what event you will do the following action (either using

TinyMCE increase font family dropdown font sizes

 ̄綄美尐妖づ 提交于 2019-12-13 14:51:09
问题 Does anyone know how I can increase the font size of the 'font family dropdown' list items in TinyMCE? Thanks! 回答1: You will need to create an own css file and use the tinymce configuration parameter content_css : your_css_file.css, Your css file will have to contain the following. You may adjust the font-size here .mceMenu span.mceText,.mceMenu .mcePreview { font-size: 11px; } 来源: https://stackoverflow.com/questions/14115747/tinymce-increase-font-family-dropdown-font-sizes

TINYMCE set focus… just will not work

我只是一个虾纸丫 提交于 2019-12-13 12:29:13
问题 I've tried tinyMCE.execInstanceCommand("content", "mceFocus"); I've tried tinyMCE.execCommand('mceFocus', false, "content"); None of them seem to work :-( 回答1: Well, I was stuck in the same problem. But I believe it depends where you execute the code. Here are various links that I've found so far: http://tinymce.moxiecode.com/forum/viewtopic.php?id=8238 http://tinymce.moxiecode.com/forum/viewtopic.php?pid=91307#p91307 But I solved my issue the following, and it might not apply to yours: this

django admin TinyMCE integration

主宰稳场 提交于 2019-12-13 11:43:17
问题 This is weird: I have installed and configured django-tinymce, but it doesn't seem to work with django admin. this works fine with Safari: class ArticleAdmin(admin.ModelAdmin): formfield_overrides = { models.TextField: {'widget': TinyMCE(attrs={'cols': 80, 'rows': 20}, )}, } but i does not work within firefox. Just adding the js does not work with either: class Media: js = ['/media/js/tiny_mce/tiny_mce.js'] I have tried various combinations of the path: with/without leading slash, with

TinyMCE PowerPaste plugin not always creates base64 string for images when copying

有些话、适合烂在心里 提交于 2019-12-13 08:26:36
问题 I am using TinyMCE PowerPaste plugin automatically to copy and paste content from Microsoft Word and other HTML sources. I am setting up to true powerpaste_allow_local_images in order to allow local images automatically been upload as Base64 encoded images and it works perfect if I copy and paste from Microsoft Office Suite such as Microsoft Word and outlook. However, if i copy and paste images from other html sources (e.g : Gmail, Google docs, etc), they are not uploaded as base64, instead

Remove onSubmit event hook from TinyMCE

偶尔善良 提交于 2019-12-13 07:29:14
问题 I'm currently working on a page where a user has the ability to edit some HTML. To enable him to do it in a nice way, I'm using TinyMCE, as it has a rather nice interface. The problem is that the underlying framework is ASP.NET MVC which doesn't allow for easy submission of HTML. As the HTML the user submits is passed on to another backend, I'd rather not just declare submission to be able to contain HTML. Instead I'd like to just run escape or similar on the form fields before submission.

How to configure TinyMCE to allow a block-level elements inside anchor tags?

天涯浪子 提交于 2019-12-13 07:06:51
问题 Here is my scenario; I want to be able to create content like: <div class="a"> <a href="someurl"><img src="somepic"></a> </div> However TinyMCE strips it to <div class="a"> <img src="somepic"> </div> Thanks! 回答1: I resolved this with: convert_urls : false, remove_script_host : false, verify_html: false, valid_children : "+a[div|h1|h2|h3|h4|h5|h6|p|#text]", :) 来源: https://stackoverflow.com/questions/18444300/how-to-configure-tinymce-to-allow-a-block-level-elements-inside-anchor-tags

Adding html class to tinymce td element

假如想象 提交于 2019-12-13 06:47:49
问题 :) It is my second post here in stackoverflow and got happy with the results of my first question. Anyway, I already have a working tinymce toolbar with a re-designed appearance. In achieving this I have used jQuery to add classes to the toolbar elements. But in some way isn't it better if upon initializing the toolbars the classes are also added.. let's say: theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough," currently: (the one that i have now) initiate

TinyMCE: delete ../ by images link

▼魔方 西西 提交于 2019-12-13 06:35:40
问题 I use TinyMCE Version 2.1 for my panel. Sorry, how can I remove from the links of the images this symbol "../"? <img src="../images/nameimage.jpg"...> I would like these links: <img src="https://www.site.it/images/nameimage.jpg"...> and NO this link: <img src="../images/nameimage.jpg"...> Thanks a lot ;) Alexander 回答1: There are several configuration options that allow you to adjust how TinyMCE handles URLs: https://www.tiny.cloud/docs-4x/configure/url-handling/ 来源: https://stackoverflow.com