Is it possible to disable the mobile UI feature in tinyMCE, and just show the regular editor?
I'm asking because it only shows a blank screen for me, in mobile (when I click on the "book" icon in the editor box.
I've searched for solutions to the blank page and I only found vague references to "a parent element having overflow set to anything but visible" which didn't help me much.
EDIT November 2019: TinyMCE 5.1 switches to the Silver theme by default on mobile devices. This workaround is no longer necessary.
Our documentation doesn't explicitly explain how to do this, and it isn't something we test so you may run into unexpected issues, but it is certainly possible.
Our mobile UI is implemented as a theme, even in TinyMCE 5, similar to how modern was our desktop theme for version 4 and silver is for version 5. By default when the editor detects it is on a mobile device the theme is set to mobile - we removed this from the v5 docs, but our v4 docs describe the defaults:
tinymce.init({
selector: 'textarea',
mobile: {
theme: 'mobile'
}
});
By extension of this concept, where the mobile block overrides the config, you can specify the mobile theme to be modern in TinyMCE 4, silver in TinyMCE 5 and the desktop interface will show:
tinymce.init({
selector: 'textarea',
mobile: {
theme: 'silver'
}
});
I have created a fiddle to demonstrate this which loads the desktop theme on my phone.
http://fiddle.tinymce.com/C9gaab/1
if you want to enable plugins (image, media, fullscreen etc.):
in config:
...
mobile: {
theme: 'silver'
},
...
in tinymce.min.js:
find
"lists","autolink","autosave"
replace to
"advlist", "autolink", "lists", "link", "image", "anchor", "searchreplace", "code", "fullscreen", "media", "table", "paste", "codesample"
or any plugins you need
I know, that source files should not be edited, but only this method helped me.
config the mobile like this:
mobile: {
theme: "silver",
menubar: false,
height: 300,
max_height: 500,
max_width: 500,
min_height: 400,
statusbar: false,
toolbar: false,
plugins: ["autosave", "lists", "autolink"]
}
Well, I just lost a night of sleep over this, so here's the dirty fix while #spyder can figure it out:
First, download the dev (unminified) version of tinyMCE here
Then, edit the file tinymce.js - Modify the function isOnMobile (should be around line 11930) to always return false, like this:
var isOnMobile = function (isTouchDevice, sectionResult) {
var isInline = sectionResult.settings().inline;
return false; //isTouchDevice && !isInline;
};
Finally, Save your changes and minify again (the unminified file is 1mb!). There are several online tools that can do this for you in case you don't these tools in place already.
Note that this only works if you are self-hosting. It ain't pretty, but until there is an official fix, it WORKS.
I'm answering this from the viewpoint of TinyMCE 6 but I think the same logic would work with TinyMCE 5 if you still want to use it for some reason.
The automatic switch to mobile features is poorly documented, but the logic seems to be that TinyMCE init object can include the property mobile to set defaults for the mobile clients. However, if you don't define this property, the TinyMCE internal default will be used instead of your generic config in the init object! This obviously results mobile clients getting totally different UI from the other clients.
As a result, you should always define the mobile property of your TinyMCE init object and use settings you've tested to work with the tools you use. For example, you could use configuration like
mobile: { // undo default mobile settings applied by TinyMCE core – many of these are not officially supported but seem to work pretty well with modern Android and iOS
resize: true,
object_resizing: "img",
menubar: true,
toolbar_mode: "floating",
toolbar_sticky: true,
table_grid: true,
}
or something similar to that. To see the currently available documentation, see https://www.tiny.cloud/docs/tinymce/6/tinymce-for-mobile/#configuring-mobile
Related
I'm using react-native-render-html to render html and the HTML Tag is like a defines subscript text.
Au IV<sup>e</sup>
In my app :
I'm trying to have style to avoid that but I think there is better way to solve the issue.
What to you thing
The default style for <sup> element looks like this:
{
textAlignVertical: 'top',
fontSize: 'smaller'
}
Unfortunately, there is a bug on React Native whereby textAlignVertical: 'top' doesn't work for nested Text elements on Android.
I've also submitted a feature request for 'sub' and 'sup' support in their Canny.
I suggest you:
Upvote the Canny feature request;
Upvote the bug report;
That would help giving more visibility to those issues. And if you or your team has any Android SDK experience, you could also submit a fix upstream. Check the bug report thread as a contributor seems engaged in resolving the issue.
I am using angular ui tinymce for creating rich text editor. I have added spell cheker tool iin the tool bar using below code -
return {
setup: function (editor) {
self.$timeout(function () {
editor.focus();
}, 200)
},
statusbar: false,
menubar: false,
browser_spellcheck: true,
spellchecker_languages: 'English=en,German=de,Spanish=es',
resize: false,
plugins: 'textcolor colorpicker image anchor link lists advlist table paste spellchecker',
toolbar1: "fontselect fontsizeselect styleselect | strikethrough bold italic | forecolor backcolor | link image ",
toolbar2: "alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | spellchecker | table undo redo",
height: "400px",
};
The spell checker option is coming properly on screen but it is not working.
When i click on spellchecker icon it is giving me below error.
"The spelling service was not found: (undefined)"
enter image description here
could you guys please help me how to make this working. I have also check .php plug in but there is no documentation how to include in angular ui tinymce.
You need to do more than just load the spellcheck plugin to get spellchecking to work in TinyMCE. You effectively have 3 options for spellchecking:
Rely on the browser's spellchecker. This is the easiest option as it only requires you to add one item to the TinyMCE init: https://www.tinymce.com/docs/configure/spelling/#browser_spellcheck
Install an open source server side spelling solution and connect it to the spellchecker plugin that you are loading. While you are loading the client side spellchecker plugin your configuration does not connect it to any server side spelling service. The basics on this are documented in the TinyMCE documentation at https://www.tinymce.com/docs/get-started/spell-checking/#phpspellcheckercomponent
Purchase a commercial Spellchecking solution. The creators of TinyMCE offer a spellchecking service that you can purchase - its called Spell Checker Pro and is offered as both an on premise install and a cloud service. The basics are documented here: https://www.tinymce.com/docs/get-started/spell-checking/#tinymcespellcheckerproplugin
In your case, you are using both the option:
browser_spellcheck: true,
spellchecker under plugins option, for this you need to do some more work and for that, you need to follow the given link:
TinyMCE 4.0.5 spell check not working
Thanks
I'm trying to use the Facebook Messenger API to create a "generic" message with a button. When that button is clicked, I want to display a "webview" (ie. a framed version of a webpage inside Messenger).
However, even though my button has the required webview_height_ratio property, it still opens up in my phone's browser, not inside Messenger. Since the Facebook documentation claims that that's all you need to make a button open a webview, I'm not sure what I might be doing wrong.
The message I'm sending to Facebook to create the button (as part of a generic template) is:
{
"recipient":{
"id": "some ID"
},
"message": {
"attachment":{
"payload":{
"elements":[{
"buttons": [{
"title":"Webview example",
"type":"web_url",
"url":"http://www.example.com",
"webview_height_ratio":"compact"
}],
"image_url": "http://www.example.com/image.png",
"item_url": "http://www.example.com",
"subtitle":"It's a TV!",
"title":"Some TV"
}],
"template_type":"generic"
},
"type":"template"
}
}
}
Can anyone tell me what I might be doing wrong?
EDIT: I'm not sure if it was necessary, but I have white-listed the domain I'm trying to point to for the webview (but obviously that hasn't helped).
I have faced same issue.
In this Block
"buttons": [{
"title":"Webview example",
"type":"web_url",
"url":"http://www.example.com",
"webview_height_ratio":"compact"
}],
Try Adding this part after web view height ratio
"messenger_extensions": "true"
The Url Should be WhiteListed before using it in the webview. For making the domain Whitelisted. Refer the Link
https://developers.facebook.com/docs/messenger-platform/thread-settings/domain-whitelisting/
In order for the webview to work on browser(chrome & rambox messenger tested) you need to set messenger_extensions to true aside from adding the webview_height_ratio field.
Apparently, webview only started to work in the last update.
Try to update your Messenger app.
https://messengerblog.com/bots/messenger-platform-1-2-link-ads-to-messenger-enhanced-mobile-websites-payments-and-more/
I figured out that webview only worked with sizes 'tall' and 'compact', as 'full' would open the default browser on my Android phone.
I'm not using extensions, but tried setting this option to false and true, but that just made the button not appearing.
It turns out that I was doing everything right: the problem was Facebook. Evidently when you use a webview it only affects mobile users. Web-based Messenger users get a new window regardless of whether or not you specify a webview_height_ratio.
This appears on all of the columns in my grid:
Chrome 28.0.1500.72 m:
Firefox 21.0:
All of the columns in my table look something like this:
{
text: 'Audit Type',
width: 100,
sortable: true,
dataIndex: 'requestType'
},
I have no idea what's causing this. The javascript console shows no errors about missing images either.
Any help that could point me in the right direction would be greatly appreciated
More info
I'm using Chrome Version 28.0.1500.72 m and Extjs 4.2.1.883
My app is run on my own computer... so a local server. I'm using Play Framework with Scala on my backend.
Oh what silliness.
I did this earlier:
.x-panel {margin: 8em;}
This ended up moving the entire grid except for the menu shadows.
Giving the grid an id property in its definition and having this instead in my stylesheet solves the problem:
#grid {margin: 8em;}
I am new to sencha touch and want to have three tabs icons i.e. Home, Profile/User and Camera. The home icon is currently visible but Profile/User is not. How can I add icon of profile/user and camera to tab in sencha touch?
here is my code for Profile.js
Ext.define('find.view.Profile' , {
extend: 'Ext.Panel',
xtype: 'profile',
config: {
title: 'Profile',
iconCls: 'user',
layout: 'fit',
scrollable: true,
styleHtmlContent: true,
styleHtmlCls: 'profilepage',
html: ['<h1>Profile</h1>'].join('')
}
});
You need to make use of pictos. Before that you need to install Ruby, as well as Sass and Compass. Follow this tutorial to adding new icon mask:
http://www.netmagazine.com/tutorials/styling-user-interface-sencha-touch-application
All the icons you can use in your ST app are located into the directory
resources/themes/images/default/pictos
However, not all are included by default in your application theme.
In order to include those additional icons you need to include the line
#include pictos-iconmask(<YOUR_ICON>);
In your app.scss file and then compile the theme using COMPASS.
If you are not familiar at all with Sencha Touch, I strongly suggest you to take a look at the following video from SenchaCon 2011 on how to style ST apps.
http://docs.sencha.com/touch/2-1/#!/video/theming
PS: Please notice that the "pictos-iconmask" mixin works only on ST < 2.2.0.alpha because from this version, it has been deprecated because of the integration of the Pictos Font.
Camera is not available as iconCls. The following icons are supported (seen here):
action
add
arrow_down
arrow_left
arrow_right
arrow_up
bookmarks
compose
delete
download
favorites
home
info
locate
maps
more
organize
refresh
reply
search
settings
star
team
time
trash
user
For styling your own icon look at #Andrea Cammarata and #user1479606 answers
if you want to add custom icon(which are not listed in pictos ) use this css in place of somename name use your name for icon
.x-tab .x-button-icon.somename,.x-button .x-button-icon.x-icon-mask.somename{-webkit-mask-image:url('path-to-image/facebook-icon.png')}
and use it as
iconCls: 'somename',