tinymce

How to add a button to ACF tiny MCE editor

 ̄綄美尐妖づ 提交于 2019-12-12 14:16:23
问题 How can i add a button to ACF WYSIWYG editor ( for example 'text color' button ). i tried this code but it doesn't work :( add_filter( 'acf/fields/wysiwyg/toolbars' , 'dw_add_buttons_to_acf_wysiwyg_editor' ); function dw_add_buttons_to_acf_wysiwyg_editor( $toolbars ){ $toolbars['Full'][2][] = 'forecolor'; return $toolbars; } 来源: https://stackoverflow.com/questions/27462326/how-to-add-a-button-to-acf-tiny-mce-editor

tinyMCE - limit RemoveFormat to a list of formats

有些话、适合烂在心里 提交于 2019-12-12 13:51:11
问题 Current tinyMCE version (3.5.2). Hi, I am working on a custom plugin which adds and removes custom formats. Adding a format to the current selection is simple however I couldn't find a fitting solution for removing multiple formats. What I did find was the RemoveFormat command: tinymce.activeEditor.execCommand('RemoveFormat'); // which is the same as tinymce.activeEditor.formatter.remove('removeformat'); This function does remove any formats of the current selection and that is definitely to

Tinymce - chenges code inside anchor tag - what are configration settings

China☆狼群 提交于 2019-12-12 12:51:06
问题 I have following piece of HTML <a href="#" class="list-feature__link"><img class="left" src="images/list/sell_off.svg" /> <div class="list-feature__text"> <h4>Sell your design</h4> <p>Lorem ipsum dolor sit amen lorem</p> </div> </a> Tinymce changes it to : <a href="#" class="list-feature__link"><img class="left" src="images/list/sell_off.svg" /></a> <div class="list-feature__text"> <h4>Sell your design</h4> <p>Lorem ipsum dolor sit amen lorem</p> </div> what are the correct configration

How should I update a TinyMCE plugin using tiny_mce_popup.js for version 4?

谁说我不能喝 提交于 2019-12-12 12:18:07
问题 TinyMCE4 documentation is currently dismal. I have an insert image plugin compatible with Ruby on Rails but it relies on the deprecated tiny_mce_popup.js. There's no information for how I should update a plugin to circumvent use of that file. 回答1: TinyMCE 4 deprecates the old file_browser_callback in favor of the new file_picker_callback which has the advantage that it can return metadata. tinymce.init({ selector: 'textarea.tinymce', file_picker_callback: function (callback, value, meta) {

How to set placeholder text when using the WordPress TinyMCE wp_editor()

房东的猫 提交于 2019-12-12 10:44:46
问题 Can you set placeholder text for the TinyMCE textarea generated by wp_editor() ? http://codex.wordpress.org/Function_Reference/wp_editor My code is currently: $settings = array( 'media_buttons' => false ); wp_editor( $content, $editor_id, $settings ); This generates a textarea with all the bells and whistles such as TinyMCE buttons and Quicktags but I can't see how I can set placeholder text. With a standard textarea you can do it like so: <textarea name="content" placeholder="Write something

TinyMCE 4.0.5 spell check not working

白昼怎懂夜的黑 提交于 2019-12-12 10:33:00
问题 I am currently using TinyMCE 4.0.5 with jQuery package and noticed that spell check is not working i am using a simple set up tinymce.init({ selector: "textarea", plugins : "spellchecker", }); With this set up i can see the option 'SpellCheck' under 'Tools' but when i click on 'SpellCheck' it throws an error 'Error: GENERAL' Also there is an error in the error log "File does not exist: PATH/tinymce/js/tinymce/plugins/spellchecker// but i can see the following file in the above path PATH

Why can I sometimes not type into my <input> in IE?

扶醉桌前 提交于 2019-12-12 08:41:25
问题 I'm having an issue where, periodically, I am unable to type into any input/textareas on Internet Explorer. I'm working primarily with IE9 at the moment. When I click on an input, the JS click handler (which empties placeholder text) runs, and the active css is applied. However, the cursor does not appear and I can't type. If I tab to an input field, and start typing, everything starts working again. I have a fair bit of JS running, but no errors running. I suspected TinyMCE had something to

Customize tinymce 4.0.5 styleselect toolbar menu

蓝咒 提交于 2019-12-12 08:34:43
问题 I'm trying to customize the default styleselect toolbar menu so I can add to it a custom menu element. The idea is to place font size as a styleselect submenu: I initialized a TinyMCE 4.0.5 in the following way: tinymce.init( { language_url : '/webobbywebapp/js/tiny_mce/language/es.js', selector:'textarea', plugins: "image, link, print", toolbar: "styleselect | undo redo | removeformat | bold italic underline | aligncenter alignjustify | bullist numlist outdent indent | link | print |

Insert an image into a tinymce editor

心不动则不痛 提交于 2019-12-12 08:27:55
问题 I have a tinymce text box on my html page. Under this text box I have a table with my file system in which I can navigate to locate my images. I would like to be able to click on an image in this table and have it inserted in the timymce text box. How might I go about doing this? 回答1: I've used the command tinyMCE.execCommand('mceInsertContent', false, '<img alt="Smiley face" height="42" width="42" src="' + sr + '"/>'); to insert the image in tinyMCE after extracting the URL from the image's

Clear Formatting button in TinyMce

家住魔仙堡 提交于 2019-12-12 08:17:53
问题 I want add Clear Formatting button to TinyMce toolbar. How to add Clear Formatting button to tinyMce toolbar. 回答1: Use removeformat button like following: tinymce.init({ ... toolbar: "...| removeformat | ...", ... }); List of all TinyMce V3 buttons 来源: https://stackoverflow.com/questions/21159778/clear-formatting-button-in-tinymce