I am using a standard tinymce ui listbox (basically a button with a dropdown) with a few options.
I would like to make it work on mobile devices. But i do not seem to be able to achieve this.
I can access the control element of the listbox, but i am not able to find the dom elements that hold the options using the control element. If i would be able to get to them i could bind a touchstart handler and trigger the necessary function.
Does anyone know a solution to this problem or has a workaround?
Thx in advance
Found out it seems to work out of the box, but what i am trying to do onselect causes a problem.
Here is working a tinymce fiddle example just in case someone needs help.
Related
I'm displaying an array in HTML page. On a text column when onfocus event is fired i display the text in CKedit using CKEDITOR.replace('#elementId').
I would like hide the CKeditor once the element is not anymore selected (using onblur event) and display unformated text as it was before selecting the element.
Does anyone know how to do that?
I think, only way is destroy instance of CKEditor
CKEDITOR.instances["YourInstanceID"].destroy();
You can recreate instance again, when needed
CKEDITOR.replace("YourInstanceID")
But, may be you should check inline version:
CKEditor inline example
I think most convenient will be using inline editors. Which only appear when user select specific element.
Another option is replacing editor after event and destroy it in other way. But this approach might be a little bit laggy, because editor should be properly destroyed and recreated, what might be time consuming for a browse. Here is an example on doubleclicking the divs, similar approach you could be able to use for focusing and bluring.
Thans for your answers.
I finaly simply added or removed ckeditor editor class in the textarea tag.
I'm working on a web application that I didn't make myself and it has been done using Dojo and specially Dijit.
The part which I'm struggling with is about a form that gets changed depending on radio buttons.
Therefore, I'm using dijit.byId('id').setAttribute('disabled',true); to disabled a field and this works on FF but not with IE8. Although, it works but not directly when I check the radio button, I have to do one more action (like clicking in a random area on the page) and the action is applied. I tried with stuff like: document.getElementById('id').disabled=true; but it doesn't work correctly either.
Would you please have any suggestion?
Thank you.
Dojo Widgets have a convention to set attributes using the set method.
dijit.byId('id').set('disabled',true);
This convention will call the _setDisabledAttr method on the widget which will take care of making itself disabled.
http://dojotoolkit.org/reference-guide/1.7/dijit/_WidgetBase.html#attributes
We had nearly the same Problem as you do.
Try dijit.registry to get or set attributes for disabled or enabled.
We had the problem with a query that tested whether one or the other radio button was active. Then another record should be read at a time.
Unfortunately this did not work with dojo.byId so we looked for a solution and found it as described above in dijit.registry.
Here's the link:http://dojotoolkit.org/reference-guide/1.9/dijit/registry.html#dijit-registry
Hope it might help you.
Regards, Miriam
I would like to know if the flipview control of the winjs library (win8) has got an event, which it called when the page turns, no matter if by keyboard or by mouseclick or swiping?
I was Googling for it, but i could just find other methods which does not fire at the right moment.
is there maybe a way you can make such events?
You should use the onpagechanged event. This will fire when the user switches pages no matter the mechanism.
Try using the pagecompleted event. Used it in one of my apps and it worked. Hope it works for you too :)
I have a SharePoint 2010 web part in minimize mode, what I want is when I click on restore in the menu of the minimize menu options , I should be able to capture that event.
How can I get an event when this restore option is selected?
I found a solution for what I was looking for, while doing it I found few things about SharePoint, I am not sure if they apply everywhere but I found them interesting enough to share,
Click events cannot be attached to verbs in menu items.
There were times when I found that I can select elements by using
pure JavaScript rather than using Jquery [I am still confused
why this happens].
Well solution turned up to be pretty simple for the question, I used a mouseup instead of click and i could capture it,
$('#MSOMenu_Restore').live('mouseup',function(){alert('trexx')});
Thanks ,
Rahul
I have an HTML <select> in many places in my application, and I want to replace it with a custom drop down. I have created the custom control which will replace the HTML <select> on DOM ready.
Now, I want to implement something that will disable/re-enable my new control if there is a Javascript disabling/enabling the original control without doing any changes in the application elsewhere except within the control.
How is it that I can capture the event of the HTML select control being disabled or enabled and attach some code to that? Is there any other way to do it?
UPDATE:
I got this thing working in IE7, Safari/Chrome but its not working in mozilla. Sample code in here http://jsfiddle.net/M73Wg/3/
This is a tricky one. Unfortunately (I believe) there is no straight answer. It comes down to: Yes you can do so by using JavaScripts DOMAttrModified event listener, but it's not cross-browser compatible.
Here are a few resources that might help you:
Detect Attribute Changes with jQuery (possible solution)
Is it possible to listen for changes to an object's attributes in JavaScript?
Listen for changes of checked/disabled in jQuery
Finally used timeout only http://jsfiddle.net/8EtJK/6/
DOMAttrModified is not working in mozilla
Regards,
SJ