![]() ![]() Thankfully, the PHP is not as involved as the JavaScript. That popup can be closed by (1) clicking the 'Cancel' or 'OK' buttons, or (2) pressing the esc key. Does anyone have any idea how I can achieve this Here is the code to create this modal. I was hoping that the TinyMCE body options would provide this, but it doesn't. When clicked, it opens a popup window via (). 2 I'm creating a custom TinyMCE button that will open the following modal to create a shortcode: What I want to have is the textbox be a TinyMCE editor. Var returnText = '' + selectedText + '' Įd.execCommand('mceInsertContent', 0, returnText) 1 I've created a small plugin which adds a button to the TinyMCE toolbar. We’ll use the create method of the tinymce object to create the plugin: When I click on the Upload button, or drag and drop a file into the FileManager, nothing happens. ![]() All of the features of the FileManager work, except for uploading files. Examples var dialogArguments . I have been able to successfully get it to load in TinyMCE's windowManager dialog. This can be used in iframe based dialog to get params passed from the tinymce plugin. Now, let’s work on the JavaScript! Start with the opening functions. getParams getParams ():Object Returns the params of the last window open call. Once you’re done making your icon image, place it in the img folder. HINT: There is an excellent project called Font-Awesome-SVG-PNG that has black and white SVG and PNG versions of Font Awesome’s icon sets. You can do this however you want, but you’ll want to end up with a 48px x 48px image file. So, your theme folder should contain the following: We will need to create a js folder (if you don’t already have one), and inside that, create a tiny-mce folder in which we’ll create an img folder and a tiny-mce.js file. As with the previous tutorial, we’re going to write our PHP in the regular functions.php file, although again, I’d recommend having a separate functions folder with dedicated files, and requiring those, for a tidier approach. Our final blockquote functionality with custom button File structure ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |