I have the TinyMCE sample with API key installed on a test page at https://myezwb.com/tinymce.htm - there is no other code on the page and the TinyMCE works great.
Now I have installed that same at the top of 3 production pages at https://myezwb.com, just like I did on the test page.
It works on one page that has a single textarea but on similar pages with one or multiple textareas it won't work, with or without an API key.
I don't find any differences between the code or structure on the three pages and/or the test page.
What am I missing?
Thanks in advance.
The error:
tinymce.min.js:2 Failed to initialize the editor as the document is not in standards mode.
TinyMCE requires standards mode
explains the issue. TinyMCE 5 requires the page in which it is loaded to be in Standards mode and not Quirks mode.
For more on this topic you can find lots of details online such as:
https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode
https://www.quirksmode.org/css/quirksmode.html
What is quirks mode?
Related
I'm trying to embed YouTube videos onto my Silverstripe site, using the page editor. We're having problems with two different ways of embedding.
Editor's Insert Media:
When I click the editor's "Insert Media" button I choose "From the web" and paste in the YouTube URL. However I need to hide related videos, so to do this we need to add "&rel=0" to the end of the URL. When I do this the "Insert Media" option doesn't work.
iFrame:
So instead I tried to use the embed code provided by Google. I went to he text editor and inserted it. The iframe works, however the editor strips off the "allowfullscreen" tag from the iframe - which means users cannot watch the video in full screen.
So I either have to show related videos, which I don't want to do. Or I need to block users from being able to watch it in full screen mode - which again I don't want to do.
We're running on Silverstripe 3.3.
Is there any way to stop Silverstripe from stripping the allowfullscreen tag? Or to have Silverstripe still process the YouTube URL if we put rel=0 on the end?
Alternatively, does anyone know if this has this been solved in 3.4, 3.5 or 3.6?
Before posting this I have done over 45 mins of thorough searching for an answer, including through Silverstripe forums (which are now discontinued), here on Stackoverflow and the Google group. Plus I worked my way through a number of the change logs of 3.4, 3.5 and 3.6 for anything related to iframes and YouTube, but was not able to find things specific to this problem.
The TinyMCE editor in a different CMS I use does not strip out the allowfullscreen tag from iframes. So it seems specific to Silverstripe's implementation of the editor.
Direct answer to your question would be to amend the tinymce config to include more attributes for the frame by setting the "extended_valid_elements"
https://docs.silverstripe.org/en/3/developer_guides/forms/field_types/htmleditorfield/#setting-options
Alternative way would be to introduce new shortcode : https://docs.silverstripe.org/en/3/developer_guides/extending/shortcodes/
Latter would be more user safe to some extend.
I have installed SilverStripe on several servers successfully in the past (but I'm not a SilverStripe expert). This time my SS install fails to work and I'm at a loss how to fix it.
The Problem
SilverStripe 2.4.6 installed correctly on the server (AFAIK).
The front-end works as expected. (Show default theme. Pages all load correctly.)
I am able to log into the CMS admin section succesfully. The CMS loads but when changing site pages in the CMS using the browser pane on the left, the CMS shows the circular loading symbol. The new page load never completes.
Using the console of Firebug in Firefox - When attempting to change pages in the CMS (by clicking on the page browser pane) the CMS tries to load two pages. The second page request 404s.
The first GET request is from the initial page loads.
The following POST+GET requests fire when clicking on the page tree to change pages.
Attempting to Find the Solution
I've tried deleting and re-installing silverstripe twice. (2.4.7 and 2.4.6) Both times the problem recurs.
A strange thing is that this server is already running two other silverstripe sites (both of which I installed without a hitch). All three websites are accessed via different domains. I tried accessing this install via another domain thinking there might be something wrong with how this third domain is configured but that didn't help either.
What should I try now? I'm stumped.
Thanks in advance.
Responses to Comments
Check your root .htaccess file. Make sure RewriteBase is set to /
Checked. Full .htaccess on PasteBin
Indeed the javascrip URL is strange. Check if there is anything unusual about what's being returned from the previous POST request. Is the site running in dev, test or live mode?
I can't see anything unusual in the POST request.
Clue Found: The site is running in DEV mode. Switching to LIVE mode and the problem disappears. Also the second GET request only shows up in DEV mode.
Example Post request with response.
Example Get request with respones.
This is a work around more than a fix but if you'd rather be coding than bug hunting it might be worth a go! (remember to log out of SS before doing this fix)
In your mysite/_config.php file change
Director::set_environment_type("dev");
to
if(!isset($_GET['isDev']))
Director::set_environment_type("dev");
else
Director::set_environment_type("live");
Then you can develop the website in dev mode normally and to use the admin in live mode and avoid the bug you just go to: http://{your_domain}/admin?isDev=0
N.B. might find a proper answer when pastebin.com isn't overloaded and I can see your responses!
hi i am using joomla 1.5 for my site.
in this i fetched the problem of tinymce editor when i clicked on any article the image button are not shown. when i clicked on edit html source button It showing only “{$lang_theme_code_title}” on the Title bar and all body is blank.
so plz help me to resolved out from this problem.
thanks in advance
You should consider trying the JCE editor instead of trying to debug Tinymce. I'm running JCE error free on over 40 sites. It has a superior image manager, link manager, and code view. It installs easily and is highly configurable. The only caveat is that you should disable the Joomla insert image, page break, and read more buttons as JCE has those built in.
http://extensions.joomla.org/extensions/edition/editors/88
See this thread:
http://forum.joomla.org/viewtopic.php?t=62545
Try adding www. to your domain. Most often this is the problem.
I searched joomla project for vars $lang_theme_code_title... and related... There are not. Looked at Tinymce editor, it has javascript driven language file...
Most likely problem is cause by JavaScript. Try using different browser (firefox or chrome).
I read info on some other forums, some claim that temporarily disabling the antivirus solved the problem. I don't think that this will work, but you can try.
If none of this helps, you will need to give more information. Load firefox with firebug and see the NET tab for JavaScript files and Ajax Requests, most likely you'll find something interesting there (i think 500 Error)
How do you put the Amazon Kindle web browser into Article Mode via HTML or Javascript?
Editor's note: Some pages are not automatically detected as "articles" by the Kindle 3 browser, and give an error message when trying to go into Article mode. What does the Article mode use to determine what portion of the page to display?
Is this related at all to Readability?
http://lifehacker.com/5163401/readability-bookmarklet-quick+formats-pages-for-smoother-text
Actual JavaScript code for Readability, which is heuristic based:
// Study all the paragraphs and find the chunk that has the most <p>'s and keep it:
This also appears to be related to Safari 5's Reader mode. Here is what is required for Safari Reader:
This definitely needs more investigating, but so far, these appear to be the most important factors for Safari’s Reader functionality to kick in:
Use the right markup, i.e. make sure the most important content is wrapped inside a container element. Whether you use <article>, <div> or even <span> doesn’t seem to matter — as long as it’s not <p>.
The content needs to be long enough. Use enough words, use enough paragraphs, use enough punctuation. Every paragraph should have at least 100 characters.
Reader doesn’t work for local documents.
http://www.wired.com/gadgetlab/2010/09/simple-tip-turns-kindle-into-ultimate-news-reader/ - The "f" key feature outlined above or some other feature? Not quite sure what article mode means.
It means that the browser will try to identify if the page you are looking at has a main body of text (is an article), parse it out and then display only that text without clutter and for easy scrolling.
I don't think you can force it via the web page's code
As far as I know, once the website has loaded (and if you are on an specific topic) you can turn on the "Article Mode" from the menu.
I've seen similar JS tools for Chrome too, so I assume it's part of webkit.
Update: Please disregard, my problem was caused by an advertisement bar being inserted by the vendor who provides my workplace wireless service.
I was building a mobile friendly website and wanted to use HTML 5. However when I specify the doctype as <!DOCTYPE HTML> , I get a gap at the top of the page on safari on the iphone.
I notice that other sites have the same problem such as nextstop.com and nike.com
I guess safari does not fully support HTML 5 yet. Anybody know of a workaround?
HTML 5 is still in a very unstable state. Don't use it in a production environment.
Edit Just so you guys know what it's about, HTML 5 is currently an Editor's Draft, and the document clearly states (in the Status of This Document section) that this specification is not stable, and that a consensus may not have been reached on any of the proposed sections. I think it should be clear enough that it means it's a bit early to start using it.
All browsers correctly interpret the HTML doctype. Putting it in sets your browser into Standards Compliant mode, that is the only difference with or without the doctype.
You can use a CSS reset tool like http://meyerweb.com/eric/tools/css/reset/ to get rid of default margins and padding on all elements.