EzDevInfo.com

tinymce interview questions

Top tinymce frequently asked interview questions

TinyMCE skin or theme that caresses the eyeballs like a milk to a goat [closed]

Where can I find a visually appealing TinyMCE skin or theme?

I'm looking for skin that's a little less Office 98.


Source: (StackOverflow)

Magento - How to allow certain tags (iframe, embed) in Magento's CMS editor?

I would like to allow to enter certain html tags such as iframe and embed in Magento's CMS editor. Magento does not allow those tags.

Is there a model or controller that I can edit to allow iframe and embed tags?


Source: (StackOverflow)

Advertisements

What are all the possible settings attributes in TinyMCE's addButton() function?

The documentation is not very clear on this.

name - String - Button name to add.

settings - Object - Settings object with title, cmd etc.

"etc"? Really? Where can I see the rest of the possible attributes?


Source: (StackOverflow)

What's the best WYSIWYG editor currently available? (jQuery suppport/integration is a plus.) [closed]

I'm working on a project that needs a WYSIWYG editor, but I haven't had to integrate one in a while, so I'm not familiar with the latest and greatest ones. I've used both tinyMCE and nicEdit in the past and I'd prefer not to use tinyMCE for this project because of its large overhead.

I don't need it to be overly complex, but I need the ability to change the available buttons on a per-implementation basis, and good compatibility with jQuery and AJAX is a huge plus. Obviously, good clean HTML support is a necessity.

So what WYSIWYG editors have you found lately? What ones would you recommend?

P.S. I know this is sort of a duplicate of This Question, but that question is nearly a year old and things change quickly.


Source: (StackOverflow)

Remove menu and status bars in TinyMCE 4

I am trying to remove the menu and status bars from TinyMCE 4 because I want to setup a very basic editor. Is this possible?

The documentation for TinyMCE 3 does not seem to be relevant and I cannot find anything for version 4.


Source: (StackOverflow)

Getting the value from a TinyMCE textarea

I have a news editor for my site with which I am using TinyMCE. What I would like to be able to do is have a button (outside of the TinyMCE editor itself) that I can click to scan the textarea for any images, then list those images as options to use for a thumbnail image for said news article.

For an idea of what I mean, please see this link here: https://docs.google.com/leaf?id=0B05m73kzudwPNzUwZjkyNmItYjZkMy00NTdlLTlkNDctOGRhYThjMzNjNTM5&hl=en_US

My problem is that document.getElementById('NewsArticle').value is not returning anything when there is text in the textarea

The other potential problem is that whats shown in the textarea is not actual code, but images etc too so I wasn't sure it would even work in the first place, but since when the form is submitted the data[News][article] value is back into text, I thought there might be a chance.

If anyone knows how to get either the content or code for the tinyMCE textarea, or has a better solution, I'd be interested to hear


Source: (StackOverflow)

TinyMce Allow all Html tag

I'm using TinyMce and even though the danger of a script attack, I need to enable all html tags with the editor.

Currently, I'm use like:

valid_elements: "@[class],p[style],h3,h4,h5,h6,a[href|target],strong/b,div[align],br,table,tbody,thead,tr,td,ul,ol,li,img[src]"

but always need to add something, I want to enable ALL HTML tags with all attributes. Is there such switch that Disables the HTML filtering?

Thanks in advance


Source: (StackOverflow)

TinyMCE width and height disobedient!

According to the (conflicting) documentation of TinyMCE, the editor takes on the size of the textarea (or other) element that it replaces. It also says that you can set the size of the editor by specifying { height: '123', width: '123' } in the init method.

I have tried BOTH and still get only one result - the editor resizes itself to (how it remembers is beyond me) what it was the last time a user resized it.


Source: (StackOverflow)

What's the best way to set cursor/caret position?

If I'm inserting content into a textarea that TinyMCE has co-opted, what's the best way to set the position of the cursor/caret?

I'm using tinyMCE.execCommand("mceInsertRawHTML", false, content); to insert the content, and I'd like set the cursor position to the end of the content.

Both document.selection and myField.selectionStart won't work for this, and I feel as though this is going to be supported by TinyMCE (through something I can't find on their forum) or it's going to be a really ugly hack.

Later: It gets better; I just figured out that, when you load TinyMCE in WordPress, it loads the entire editor in an embedded iframe.

Later (2): I can use document.getElementById('content_ifr').contentDocument.getSelection(); to get the selection as a string, but not a Selection Object that I can use getRangeAt(0) on. Making progress little by little.


Source: (StackOverflow)

how to add font-size toolbar in tinyMCE?

this way i initialize tinyMCE to a textarea. font, bold italic is working but font size select is not working .

tinymce.init({
    selector: "textarea#content",
    theme: "modern",
    width: 586,
    height: 300,
    menubar:false,
    font_size_classes : "fontSize1, fontSize2, fontSize3, fontSize4, fontSize5, fontSize6",//i used this line for font sizes 
    content_css: "css/content.css",
    toolbar: "sizeselect | bold italic | fontselect | fontsize",//used font size for showing font size toolbar   
style_formats: [

    {title: 'Bold text', inline: 'b'},
            {title: 'Red text', inline: 'span', styles: {color: '#ff0000'}},
            {title: 'Red header', block: 'h1', styles: {color: '#ff0000'}},
            {title: 'Example 1', inline: 'span', classes: 'example1'},
            {title: 'Example 2', inline: 'span', classes: 'example2'},
            {title: 'Table styles'},
            {title: 'Table row 1', selector: 'tr', classes: 'tablerow1'}
    ],
});**

Source: (StackOverflow)

How to automatic resize tinyMCE?

I have a TinyMCE that is set over a TextArea, and I want this editor area to ocuppy all the space of its parent div, all times.

I have a JS function that get the current space and set the textarea.style.height to it, but when I enables TinyMCE it seems to stop working.

Also, the textarea has width: 100%; it doesn't resize by HTML rendering when it's using TinyMCE too.

Any ideas?


Source: (StackOverflow)

Allowing custom tags in TinyMCE for integration with indexhibit

I'm trying to allow some custom tags to be entered into TinyMCE. The tag is

<plug:plugin_name />

However this is turned into

<plug:plugin_name></plug:plugin_name>

I'm about to write a regex to deal with this as I have to get the job done, I'd really rather not, but it will fix my issue.

I've tried many of the init options:

extended_valid_elements : "plug.plugin_name[*]",
custom_elements: "plug.plugin_name[*]",
verify_html : false, **//This ment that the tag wasn't ouright removed**
selfclosetags : \" />\", //some plugin I found, didn't seem to work
closed : /^(br|hr|input|meta|img|link|param|area|plug:plugin_name)$/,

Anyone else definitely got this to work with a recent version of TinyMCE?

Also, another problem will be the editor will strip away the tag, after I have fixed it with the regex!


Source: (StackOverflow)

Compare TinyMCE and CKeditor for a Wiki

For a custom wiki django-wakawaka, i want to be able to add a WYSIWYG support.

TinyMCE is obviously the most popular plugin, used even by Wordpress.

But CK-editor seems more feature full.

Those who have used either of these or both, which is better and why. Are there some better packages, that I am missing?

Is there something that I am missing when I conclude CKeditor is better, by going through them (because it is not as widely used).

I want to use it with django and jquery, with multiple instances of WYSIWYG widget per page. Does one offer advantage over the other.


Source: (StackOverflow)

Disable TinyMCE absolute to relative URL Conversions

Can anyone tell me how to get TinyMCE to stop converting my URLs to relative links in Plone?

For example, if I enter this in the HTML source:

<img src="/images/dir/subdir/my_image.png" />

it will convert it to:

<img src="../../../my_image.png" />

I've edited tiny_mce.js (in portal_skins) to set:

convert_urls:false,
relative_urls:false,

but to no effect. I've read all similar posts here, but none really answer this question.

It's fine if it does the relative thing when users are picking images by browsing the filesystem (i.e. the catalog). I just want it to respect what I type in the html box ... so that I have the option of forcing an absolute path if I deem it appropriate. This is the standard behavior in kupu.

Any ideas?


Source: (StackOverflow)

I am using tinymce, Is it possible to apply for only one textarea

I am using tinymce, I have multiple text areas on my page. Is it possible to apply for only one textarea,

1 text area is for description validation is like below

var text = tinyMCE.get('txtdesc').getContent();

But i have more 3 more text areas in my page so tineMCE should not apply for all these text areas

How can i apply only for one text area

// this is my tinyMCE code 
    tinyMCE.init({
        mode : "textareas",
        theme : "advanced"
    });

// /tinyMCE

Source: (StackOverflow)