tinymce

How to affix dropdown list menu next to selected dropdown button when user scrolling?

别等时光非礼了梦想. 提交于 2019-12-12 01:36:08
问题 I have faced the similar problem occurred on this page as in my App. When a user selects the drop-down list it will open drop-down menu. But, When the user scroll down the page, the drop-down menu is still on the same position. How to resolve this? Thanks in advance. 回答1: I've recently faced this type of issue. So I've used mouseenter,mouseleave events. $( ".menu-open" ) // not necessary .mouseenter(function() { $( this ).show(); }) // you must put this to hide menu when user leaves the menu

Wordpress Text Widget replaces php tags with html comment tags?

泪湿孤枕 提交于 2019-12-12 00:55:44
问题 I am attempting to add some php to a page on my wordpress site in the code editor part of my tiny mce editor. However, whenever type something like: <?php echo "Hello World"; ?> and then save the article, when I next go to edit the article it replaces my php tags with a html comment: <!--?php echo "Hello World"; ?--> Would be very grateful if anyone knows what is going on here and why WordPress is doing this. 回答1: To use PHP code in your content editor, you will either need to install a

TinyMCE: when selecting Bold, how to use different font instead of applying normal bold style?

社会主义新天地 提交于 2019-12-12 00:38:02
问题 When I select Bold in TinyMCE I want to make it use a different font instead of just using the bold variant of current font - how can I do that? 回答1: // get the current editor var editor = tinyMce.activeEditor; // get the editor formatter var f = editor.formatter; f.register('customBold', { inline: 'span', selector: 'span,p', styles: { fontWeight: 'bold',fontFamily: 'arial'.....your custom style }, }); editor.addCommand('customBold',function(){ editor.applyFormat(name) }); // add a button in

Is there a better way to get HTML5 <input type=file> to work with tinyMCE?

江枫思渺然 提交于 2019-12-11 13:55:54
问题 My goal is to use the tinyMCE image plugin in order to upload image files directly into the html content area. I want this to use the file upload control because of security and cross browser functionality. I setup TinyMCE like so: tinyMCE.init({ selector: '.html-content', menubar: false, statusbar: false, toolbar: 'undo redo | image', plugins: 'image', file_browser_callback: this.getSystemFile }); And the function for getSystemFile is defined as so: function getSystemFile(field_name, url,

load html file as initial content in tinymce editor

旧时模样 提交于 2019-12-11 13:02:58
问题 I have set up tinymce in my asp.net mvc project. I want to load a html file into TinyMCE editor content, which is located at another destination. I followed the tiny Documentation but it is a bit confusing to give a path to my html file. tinyMCE.activeEditor.setContent('<span>some</span> html'); this is my cshtml file @{ } <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width" /> <title>TinyMCE Example</title> <!-- TinyMCE Script Reference --> <script src="~/scripts

TinyMce disappears in SPA - Knockout binding evaluated twice causing editor to fail

女生的网名这么多〃 提交于 2019-12-11 12:36:19
问题 I’m trying to implement TinyMCE into John Papa’s HotSpa template . I’m currently using Knockout 3.1.0 , and Durandal 2.0 . For some unknown reason, my custom knockout binding init method is triggered only once on first load, but twice when view is refreshed. By refresh, I mean using durandal router, I navigated to the same view again (but with different parameters). It still went through the whole durandal life cycle, hooks of deattached and attached are called again. I had some debug code in

Setting default font size in TinyMCE is failing

删除回忆录丶 提交于 2019-12-11 12:32:14
问题 I am using TinyMCE and I want to set the default font-size to 12. Here, I assigned a variable to the active TinyMCE editor, but it's not working... HTML content: <textarea id="text_message"></textarea> JavaScript: $("#text_message").tinymce({ // Location of TinyMCE script script_url: '/static/app/a/scripts/tinymce/jscripts/tiny_mce/tiny_mce.js' }); var fontSize = 12; tinyMCE.activeEditor.formatter.apply('fontSize', { value: fontSize }); 回答1: There's a couple of different event stages you

Appending a string to a tinyMCE instance

我只是一个虾纸丫 提交于 2019-12-11 12:24:38
问题 I need to append a string (an img tag) to a tinyMCE editor instance. I was doing it like this: $("#textboxhiddenbytinymce").append( string ); tinyMCE.triggerSave(); with no luck. I was wondering if: There is a direct method for adding an arbitrary string (I need complete control over it) to an instance of tinyMCE I understand that the way I'm doing it is wrong since tinyMCE works indipendently to the "original" textarea. Thank you very much! 回答1: The only way this will work is if you use the

How to allow some custom tag in tinymce editor

谁说胖子不能爱 提交于 2019-12-11 12:07:35
问题 when i pest a html code inside tinymce editor my < figure> tag remove by this editor. how to allow this tag in tinymce editor. <ul> <li> <div class="list-top"> <figure>1</figure> <div class="list-top-right"> <h3>It's Competitive Out There</h3> </div> </div> </li> </ul> it convert into <ul> <li> <div class="list-top"> 1 <div class="list-top-right"> <h3>It's Competitive Out There</h3> </div> </div> </li> </ul> Just remove this <figure>1</figure> tag 回答1: Use .html() in jquery $("ul li").html

getting 403 forbidden in ajax

谁都会走 提交于 2019-12-11 11:01:49
问题 I am getting a very strange 403 forbidden error in an ajax call. The data is being sent in a post javascript object of multiple javascript variables after applying JSON.stringify on the object. One variable in the object is causing problems, which is the text/html fetched from the editor. 403 forbidden is thrown when there are two 'p' tags in the text editor. 'p' or any other tag. When there is only 1 tag in the editor, the ajax call successfully completes. I thought there is some kind of