I have a block of text with some of its regions editable via contentEditable property. I am using Paste plugin's paste_preprocess to cleanup the text before pasting it. But when I try it get the o.centent (the clipboard data) it returns empty.
But when I try to do the same with a completely editable section, it works fine.
Any clue?
Thanks,
Imran
Although, it has been fixed. I invite seniors to please comment on the workaround I used to make it running. Please follow the link below:
http://tinymce.moxiecode.com/forum/viewtopic.php?pid=84335#p84335
Related
I'm trying to get TinyMCE to work for my site at https://nicer.app/apps/eyJjbXMiOnsicGFnZSI6ImluZGV4In19
But for some reason, the menus won't show.
Not for their simple example code, nor for their full-featured example code.
I'd love some pointers on what i'm doing wrong here.
with help from the bug reporting section at github, the problem was localized to my usage of overflow:hidden on the HTML tag instead of the BODY tag.
changing this fixed the problem :)
You have
menubar: false
...in your configuration so TinyMCE is just doing what you are asking it to do?
I have a custom button that insert some HTML in the editor
First block of code is the button action and the second one is how the HTML is inserted
Any idea why it is rewriting it that way and how to stop it?
I just managed to fix it, in the init function:
valid_children : 'pre[code]'
TinyMCE includes the ability to insert code samples into the editor via its Code Sample plugin:
https://www.tinymce.com/docs/plugins/codesample/
If you want to try to do this yourself you need to do a few things like using the protect configuration option to tell TinyMCE to allow your PHP tags. See this TinyMCE Fiddle for a basic example:
http://fiddle.tinymce.com/Qdgaab
I have a custom plugin that adds a link with a class attached. When I view this using the Source button it shows the class and looks as it should. However, when I go back to WYSYWIG view and then view the source again the class has been stripped out.
Any idea how to stop this happening?
Thanks in advance for your help.
Check this blog post.
In CKEditor 4.1 RC we've introduced ACF - Advanced Content Filter. You need to integrate your plugin with it, because otherwise special content created by it is stripped.
For CKEditor4 and for simple config.js modification, disabling the "default filters": see this new question/answer.
(copy)
At config.js you can add something like,
CKEDITOR.config.allowedContent=true;
see "Advanced Content Filter" (ACF) and how to enable/disable it.
Two questions and maybe they are caused by the same thing/setting.
Using TinyMCE with full corporate account. Many of the publishers are just pasting HTML into the HTML Source Editor... we are just getting this going the results are very mixed.
So if someone has a well coded page it works well - as far as we think.
But if you create a page with a couple of (or one) open div tag. Holy cow! The editor can throw divs everywhere - 30 extra on one page someone sent me. Why is the editor changing content? Can we keep this from happening? If a publisher makes an HTML mistake we would rather that the mistake shows - not be scrubbed.
Also I noticed myself when creating menus that if you put in anything inside a link tag (like a div, ul, li, dd, dt, dl, h1-6... pretty much any tag) other than a span, that the editor will either push the tag content outside of the link tag or it will change the tag to a span.
http://www.tinymce.com/wiki.php/Configuration:Cleanup/Output
Looks like the verify html is the new setting. Will report back after testing.
David - I would have marked yours as right if you answered. Looks like that works for 3.4 and below.
For version 3, use
verify_html : false
From here http://archive.tinymce.com/wiki.php/Configuration3x:verify_html
im using TinyMCE Wysiwyg editor, and when i enter a link, or an image from the same website, it removes the base url
for example, if i enter: http://www.domain.com/somelink.php - i'll get - somelink.php
any ideas how to solve it?
thanks!
Add this few lines in your tinyMCE.init function :
convert_urls:true,
relative_urls:false,
remove_script_host:false,
(Old thread I know but in case anyone else is googling this:)
I had to set convert_urls to false as well.
I am using TinyMCE within Umbraco, so I needed to make the changes in /config/tinyMceConfig.config and then restart the website.
It's very easy to solve.
Instead of Epharion said, simply put this line in your tinyMCE.init function:
tinyMCE.init({
...
document_base_url : "http://www.site.com/path1/"
});