I've just began to use codemirror. Now I'm facing some problems that I don't know how to solve them. It's about change the class with some specified token For example, I want to change this "let" style:.
I've tried to use getValue() or getLineHandle(), but it seems like not to work. I should maybe get the specified dom object, but I don't know how.
Related
I am using the in the code the Html class name are not viewable.
but if I use inspect element I can find the HTML class name that it uses such as slds-carousel__content etc.
My problem is i cant access those class name on my client side controllers.
Is there a way to get those class name ?
Here is a link to that describes how to change the class. You can get the component by using component.find("insertnamehere").getElement(); It's not always reliable unless you are specifying a render attribute on the controller though.
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/js_cb_show_hide_markup.htm
as a side note: as sanctimonious as some of the mods on the Salesforce stackoverflow might seem, it is still a more likely place to find such content. Good luck.
I want to use DFP with swift.
I'm trying to use performClickOnAssetWithKey:customClickHandler method for reporting click.
https://developers.google.com/mobile-ads-sdk/docs/dfp/ios/native
But, it doesn't work and the closure doesn't work as well.
Have anyone used this method?
Finally, I found the answer.
GADNativeCustomTemplateAd has variable name googleClickTrackingURLString. then we can get the value nativeCustomTemplateAd.valueForKey("googleClickTrackingURLString")
And after I accessed the url, clicking report counter ran correctly.
In conclusion, I didn't use performClickOnAssetWithKey:customClickHandler method.
I have copied the Forms from the /libs/foundation/components/form to /apps/mywebsite/components/form, I made some changes to the copied form files but still the default form is getting called.
Could you let me know or provide some documentation for the forms.
Thanks in advance
The problem is that you moved things to:
/apps/mywebsite/components/form
Instead, you need to copy them to:
/apps/foundation/components/form
apps overrides libs ONLY if the path is otherwise the same
so:
/apps/something/something/somethingelse
will override:
/libs/something/something/somethingelse
if ANY part of that path is different, that overlay won't work.
In addition, if something calls a component/resource/whatever under /libs using the fully qualified name (e.g. actually including /libs/ at the beginning) then it will still use that. But this is rare.
Let me know if you have more issues.
BTW, you can change this search approach (apps before libs) in the resource resolver settings in OSGI. It comes this way by default but can be changed.
If you didn't want to overrride but extend the foundation forms, you need to make sure that you copied everything or have the inheritance to foundation right. Most important is the cq:editConfig/cq:formParameters, where you need to have sling:resourceSuperType="foundation/components/form/defaults/field". If you use a cq:template instead, you need to set the supertype parameter there.
Then you would have to use your components on the page instead of the foundation ones.
I'm developing a multilanguage application, and use routes with translated segments. For multilingual support I created special Multilingual plugin.
To use translated segments I need set translator for Zend_Controller_Router_Route before routes init. So only possible place for this in my plugin is routeStartup method, but there is one problem here - for determine right locale I need to use properties of request (Zend_Controller_Request_Abstract), like module, controller and action names, but they are not defined yet here in routeStartup method. They are already defined, for example, in routeShutdown - but I can't set translator for route there, because it have to be done before routes init.
So what can I do:
can I get request properties somehow in routeStartup
or can I re-setup translator later in routeShutdown
P.S: there is a question with exactly the same problem Zend_Controller_Router_Route: Could not find a translator, but proposed answers is not the option for me, because I can't just retrieve language code from url with Regex, I have much more complicated code to define right language code.
Thanks.
What about putting your code in preDispatch? That's what I personally do when I need to check if the person is logged in. Maybe you can move your code there too?
I currently have an issue where I want text field to be automatically selected when the user visits my webpage, I currently do this by Javascript but would, ideally, like to use YUI. After searching the web, i found this command,
YAHOO.util.Dom.get("first_element").focus();
and
YAHOO.util.Dom.get("text1t").focus();
but have had very little luck getting it to work, one suggestion was to use a setTimeout fnction, but this seems a rather ugly way of doing it.
If anyone has any suggstions I would be very grateful.
Thanks,
Try using onAvailable
YAHOO.util.Event.onAvailable("elementId", function(me) { me.focus(); }, YAHOO.util.Dom.get("elementId"));
You may need to use a later event, like onContentReady or even onDOMReady if that doesn't work.