TinyMCE – Add button that changes direction of selected text

Ok, I am going to create website in Urdu(rtl) & English(ltr) language that contain paragraphs like this: <p style=”direction:rtl”>کیا حال ہے buddy? سب خیریت ہے؟</p> You can see that sentence in not showing correctly. I want to change the direction of English words in sentense. like this: <p style=”direction:rtl”>کیا حال ہے <bdo dir=”ltr”>buddy?</bdo> سب خیریت … Read more

TinyMce in WordPress – Getting the “fullscreen” button to stay on the right when customising button layout

I’m using TinyMce inside WordPress and I have customised the button layout like so: add_filter( ‘tiny_mce_before_init’, ‘blm_format_tiny_mce’ ); add_filter( ‘mce_buttons’, ‘blm_extended_editor_mce_buttons’, 0 ); add_filter( ‘mce_buttons_2’, ‘blm_extended_editor_mce_buttons_2’, 0 ); function blm_format_tiny_mce( $in ) { $in[‘remove_linebreaks’] = true; $in[‘convert_newlines_to_brs’] = false; $in[‘keep_styles’] = true; $in[‘tabfocus_elements’] = ‘publish’; $in[‘paste_remove_styles’] = false; $in[‘paste_remove_spans’] = true; $in[‘paste_strip_class_attributes’] = ‘mso’; $in[‘paste_text_linebreaktype’] … Read more

TinyMCE Plugin Parameter

Can anyone tell me if there is anywhere I can find out what each of these TinyMCE plugins are for? $in[‘plugins’]=’inlinepopups,tabfocus,paste,media,fullscreen,wordpress,wpeditimage,wpgallery,wplink,wpdialogs,wpfullscreen’; I’m wondering because if I remove the wordpress one that the editor will stop stripping out my <p> tags, but I also lose all my spacing in the html view of the editor as … Read more

2nd button row from WP Super Edit or TinyMCE Advanced doesn’t show to 2nd admin

I’m currently using WP Super Edit. But the same problem persists with TinyMCE Advanced. This is how it is configured: View post on imgur.com View post on imgur.com View post on imgur.com This is how I (admin) see it: http://i.imgur.com/OAdnF.png This is how my friend (2nd admin) sees it: http://i.imgur.com/mfUMq.png I’m getting desperate figuring out … Read more

How can I find the ‘public absolute’ path of a file?

Short Version I need to give in the absolute path of a Javascript file that is to be hooked into something. It works if I hardcode it into ‘http://mywebsite.com/folder/script.js’ However I prefer not to hardcode it in. I can do dirname(___FILE___), which gives me this: ‘/home/public_html/folder/script.js’ But that fails, the script isn’t loaded. What’s the … Read more

TinyMCE Autoresize

Looking for a way to make the TinyMCE editor always relative to it’s content so that the height of the editor changes accordingly to how much text/images it contains. There seem to be plugins for TinyMCE for this already, but I’m not sure on how to apply it for the WordPress version: http://www.tinymce.com/wiki.php/Plugin:autoresize function init_tinymce_autoresize($initArray){ … Read more