tinymce-4

Unrecognized Character Between Empty P Tags TinyMCE

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 09:26:42
问题 What character does tinyMCE put in between empty p tags. I have the following empty p tags: <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> Which I'd like to remove... but they are not recognized by str_replace or preg_replace. The best I could do to track down the issue, is the space between the tags. In other words I can remove the <p> by itself or the </p> ... but when I try searching for <p> </p> it doesn't find it. Tried   or I found many solutions online but NONE work. It seems

How can I add custom bullets to tinyMCE?

不羁岁月 提交于 2019-12-11 06:45:17
问题 I want to add a few extra option to the bullets dropdown on tinyMCE, is that possible? I want to add ► type of bullet and different color options. (red, blue, etc...) 回答1: Yes. In your tinyMCE config, you need to specify: style_formats: [ { title: 'Custom Bullet', selector: 'ul', classes: 'custom1' } ], From there, you need to specify the styling in the CSS: .custom1 { list-style-image: url('custom1.png'); } See this for more info: https://www.tinymce.com/docs/configure/content-formatting/

Can't type in tinyMCE 4 instance after mceAddEditor

↘锁芯ラ 提交于 2019-12-11 06:16:58
问题 Pre-note: This issue occurs whether or not I already have a textarea on the page. I have a button that triggers an ajax request first...writing something to a database and returning the key. I use that key in my ID for the textarea that is then dynamically added to page. Keep in mind that tinyMCE is already initialized. tinymce.init({ selector: ".editor", setup: function(ed) { ed.on('change', function(e) { tinymce.triggerSave(); $('form').trigger('checkform.areYouSure'); }); ed.on('init',

Tinymce : Don't replicate class when adding a new paragraph on enter

冷暖自知 提交于 2019-12-11 04:35:00
问题 Using a custom button, I add a paragraphe with a class and some content, like so : <p class="mce-new-class">my custom content</p> When I press enter after such a paragraph, TinyMCE will automatically add a new paragraph using the exact same class : <p class="mce-new-class">my custom content</p> <p class="mce-new-class"> </p> I'd like to only have a new paragraph but without the class : <p class="mce-new-class">my custom content</p> <p> </p> I've tried this : tinymce.init({ ... setup: function

Drop-down menu/ComboBox/listbox in TinyMce 4?

限于喜欢 提交于 2019-12-11 03:26:12
问题 After doing some research in google for pretty long time found some info on Drop down menu , but the documentation doesn't have clear information for me to understand, or other docs are mostly on TinyMce3 . I've customized TinyMce 4 adding a button, menu and sub-menus and have used Window Manager with text box and radio button (which is a checkbox , poor efforts I know), but I need a drop down list/listbox in Window Manager edit : Radio buttons are not supported in tinymce4 回答1: this helped a

How to create a button in TinyMCE 4 that increments font size

六月ゝ 毕业季﹏ 提交于 2019-12-11 01:54:43
问题 Has anyone managed to create a button in TinyMCE 4 that will increment the font size of the selected text by, say, 1px? The problem I'm having is getting ahold of the selected text, whether it's in a span already or not. I'm willing to modify the TinyMCE source. Thanks for any ideas. 回答1: You don't need to modify the source code, you can create a plugin. Here is the documentation of how to create a plugin for TinyMCE: http://www.tinymce.com/wiki.php/Tutorials:Creating_a_plugin based on that

Dialog with TinyMCE causes error 12003

六眼飞鱼酱① 提交于 2019-12-10 23:45:09
问题 With the newest update to Word (1611) dialogs with TinyMCE causes error 12003: Invalid URL Syntax. According to Use the Dialog API the cause is The dialog box was directed to a URL with the HTTP protocol. HTTPS is required. Simple example is to put below code in a dialog (oddly enough it works in a panel). Updated code <!DOCTYPE html> <html> <head> <title>Office.js with TinyMCE</title> <meta charset="utf-8" /> <script src="https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js" type=

Reinitialize TinyMCE 4 in AJAX

两盒软妹~` 提交于 2019-12-10 19:57:09
问题 I'm using TinyMCE in an ajax enabled Foundation Reveal box. Now the TinyMCE kicks in the first time it loads, but if I close the box and open it again it doesn't trigger :( I have other scripts like chosen and masked input triggered in the exact same fore query that work, but TinyMCE will not reinitialize when I reload it a second time This is my code currently that I'm trying as recommended at this question: $(document).on('opened.fndtn.reveal', '[data-reveal]', function () { $("#expenseUser

TinyMCE add custom control for windowManager

独自空忆成欢 提交于 2019-12-10 18:25:34
问题 My goal is to create a custom control to be used in the dialog's body opened width editor.windowManager.open . I found the standard controls source class on github, but I can't find a way to add a new control through a plugin. https://github.com/tinymce/tinymce/tree/master/js/tinymce/classes/ui After hours of searching I couldn't find any documentation, tutorial or stackoverflow response. I then tried to include the control declaration in the plugin but I get a ReferenceError: define is not

TinyMCE not working - even with their example?

社会主义新天地 提交于 2019-12-10 15:50:38
问题 ISSUE: I am attempting to use TinyMCE 4.0.12. But couldn't get it to work, it just makes my text areas disappear altogether. What i have done so far: I even copied their example code exactly from their page, and it doesn't even work with that. I have extracted all of the files to "js/tinymce/" Is there something obvious I am missing? Fiddle: http://jsfiddle.net/cg3e8/ JS CODE: <script type="text/javascript" src="js/tinymce/tinymce.min.js"></script> <script type="text/javascript"> tinymce.init