tinymce-4

tinymce in bootstrap modal: wrong dropdown position on scroll

一个人想着一个人 提交于 2019-12-07 06:28:44
问题 I'm using tinymce inside a bootstrap modal but I'm having a problem with tinymce dropdowns on page scroll: basically their absolute positions are not updated and they are shown in the wrong position. I prepared a jsbin to show the problem: just open the color picker and scroll the page. Any hints? Anyone had the same issue and managed to make it work? Thanks 回答1: In addition to user206056 css answer: .mce-menu {position:fixed !important} try adding to your TinyMCE init method, adding the ui

Is it possible to have custom Functions and commands in the TinyMCE4 Menubar?

不羁岁月 提交于 2019-12-06 19:45:53
I have learned how to integrate custom commands in the Tiny Toolbar with the ed.addButton() Function. Is there a similar way to add functionality to the Upper menu, the menubar ? In the Tiny Documentation I just found how to change the order of the menu secton with this code in the init function: menubar: "tools table format view insert edit", Examples : // Adds a custom menu item to the editor that inserts contents when clicked // The context option allows you to add the menu item to an existing default menu tinymce.init({ ... setup: function(ed) { ed.addMenuItem('example', { title: 'My menu

upload image after crop in tinymce 4

六眼飞鱼酱① 提交于 2019-12-06 12:44:04
I am working on tinymce and I have implemented imagetools. Now when image gets inserted in the text editor and then I edit/crop the image it changes the image src to something like blob:www.localhost/asdf-ghij . What I want is after cropping I can send this url to my php script so that i can save this image on my server. But I have no idea of the event/function that i should use. here is my code: tinymce.init({ selector:'textarea', plugins:[ 'advlist autolink lists link image imagetools charmap print preview anchor', 'searchreplace visualblocks code fullscreen', 'insertdatetime media table

Tinymce 4.x extend plugin

北城以北 提交于 2019-12-06 05:09:25
问题 I'm looking for some examples on how to extend a existing tinymce (4.x) plugin, e.g. the "link" plugin. The link plugin opens a dialog window... what I'd like to do is add an event when the dialog is opened and modify the body (insert some extra HTML with click events). It seems to be problematic to do it nicely... I want to avoid some "on top" code like $('#mce_13').click(...); and rather use something like editor.on('DialogOpen', function(e) { // if link dialog then $(e.body).append('<div

ngModel.$render is not called when model change

ε祈祈猫儿з 提交于 2019-12-05 20:17:40
I'm trying to use tiny-mce with angular, but i have some trouble with the $render function in the directive. When i update the model, the $render function is not call. Here a plunkr to illustrate: http://plnkr.co/edit/Ih1nDq?p=preview I'm not sure, but i think it could be related to angular 1.2, because with angular 1.1.5, it works : http://plnkr.co/edit/LXAtHd?p=preview Is this a bug of angular 1.2, or did i miss something new with angular 1.2? As far as I can see, the $render function is only called once. If you need to update your view on model changes you can add a function to the

TinyMCE Advanced theme - Where is it?

天涯浪子 提交于 2019-12-05 18:15:45
问题 I am in the process of creating a drop down list with contains a list of classes so my users can apply them to link, paragraphs etc. I have read in a lot of places now that the advanced theme supports this out of the box but I can't find out where to download this theme. I suspect the advanced theme is Wordpress only at this point as I found it included in the wordpress download but not in a format that would allow me to use it. Am I missing something? 回答1: OK, I found out where the confusion

TinyMCE 4 default font-size

倾然丶 夕夏残阳落幕 提交于 2019-12-05 14:01:23
In TinyMCE 3 you can change the editor's default font-size by using this code in the settings: setup : function(ed) { ed.onInit.add(function(ed) { ed.getDoc().body.style.fontSize = '14px'; }); } In version 4, I tried using the same method but get this error: TypeError: ed.onInit is undefined I also tried using the "content_css" option and set the body to 14px font size, but that works only when on preview. http://www.tinymce.com/wiki.php/Configuration:content_css Has anyone found another way to set the editor's default font size? I couldn't find any documents, even in their forum. setup :

tinymce in bootstrap modal: wrong dropdown position on scroll

爱⌒轻易说出口 提交于 2019-12-05 08:56:20
I'm using tinymce inside a bootstrap modal but I'm having a problem with tinymce dropdowns on page scroll: basically their absolute positions are not updated and they are shown in the wrong position. I prepared a jsbin to show the problem: just open the color picker and scroll the page. Any hints? Anyone had the same issue and managed to make it work? Thanks In addition to user206056 css answer: .mce-menu {position:fixed !important} try adding to your TinyMCE init method, adding the ui_container parameter and set it to the selector of your bootstrap modal. Something like: tinymce.init({

TinyMCE 4 imagetools not working for remotely stored images

丶灬走出姿态 提交于 2019-12-05 07:26:30
问题 TinyMCE has a plugin called imagetools . This was working before, but for some reason now the contextual inline menu will not appear anymore and I would like to have it back. Here are my init parameters schema: 'html5', inline: false, toolbar: 'bold italic underscore image', menubar: true, plugins: [ "advlist autolink lists link hr anchor pagebreak", "searchreplace wordcount visualblocks visualchars code fullscreen", "insertdatetime nonbreaking table contextmenu directionality", "template

TinyMCE: How do I prevent `<br data-mce-bogus=“1”>` text in editor?

徘徊边缘 提交于 2019-12-05 04:02:50
I have a page with several TinyMCE (v4) editors, which all work great ... until I try and add: inline: true to their configuration. When I do that the inline-ing part works great (the toolbar is gone, then appears when I focus the editor), but for some strange reason the editor stops working at that point. Inside the editor I see: <br data-mce-bogus="1"> but I can't edit that text, or add new text, or do anything at all really with the editor. I can make the editor work again if I remove inline: true , but I really want the inline effect. Does anyone have any idea how I can get inline without