I have ckeditor embedded into one of my pages....but I don't know how to wire up certain buttons in ckeditor to perform specific actions. Most importantly, how do I tell it when the save button is clicked to save the document?
Dave--
The beauty of the save button in CKEditor is that it is setup default to submit the form that it's in. In my company's case, I bolted in CKEditor expecting to have to disable the save button because the larger form already had a save button...but it turns out that it worked right out of the box. Get the system installed, tested, and hit save...see what happens.
You can control the output of buttons in the Config.js file. If a particular button is not to your liking, you can use javascript to define actions or create new buttons there as well. There are fairly good tutorials on this at http://docs.cksource.com/
Related
So basically I need my submit button to create a template site.
I mean totally new file.php with some default CSS styling and values from forms.
The file.php would be created automatically in my web folder when I hit submit button.
I know something like this can be done by loading content from database but that is not what I want.
I am not really sure how to do that. Whatever it takes, I am going to learn that, please help.
I wanted to make specific inputs go into another part of a site (e.g. https://myexamplesite.com/anotherpartofit.html)
And also make those specific inputs be the ones that someone saved it in.
An example of what I think would work is: Get value from input 1 from /apartofit.html and put it in input 2 at /anotherpartofit.html and make it non-editable
If it needs to use a database, I would prefer if you could help me with firebase (Google's Database). But in my knowlege, it probably needs to use javascript, so I'll be tagging it, if it doesn't, let me know!
in visual studio or notepad or every offline web creating spaces you can't but if you buy a domain or simple , online site , you have to crate a page and get the link of that page then open another page create a button set the button's href to link of pervious page finally hit the button !
I'm using CKEditor in a website and I want to use it as editor of the page itself. So the user goes to the page, modifies what he wants in the ckeditor textarea(s) and then he clicks 'save' or 'submit' and the page is modified (that page would be protected by a login, so only certain users could modify).
Problem is I have no idea how to save the content of ckeditor in that same textarea that was modified, I tried looking around but everyone wanted to save data in a DB or send it to some other page.
I found 2 plugins that implement some save function but again, I don't know if I can use those to do what I want. (Save plugin, Inline save.
Hope you understood what I'm asking, thanks in advance.
I have written some javascript and attached it onto the onSave event of an entity to perform some actions when a record is deactivated. This works fine when on the form but if a user decides to deactivate the record from the entity view then this code does not get fired. Is there a way that I can attach this event to deactivating from here?
Thanks
You'll have to create plugin if you want to perform some action that doesn't take place on the actual form itself, or a button on the ribbon. See this similar question
You can use the a Ribbon Editor to edit the "deactivate" Ribbon Button in the homepage grid to include a javascript function in a webresource. So when it is clicked the button will trigger your javascript code.
the only adjustment you have to make is to accept an input parameter given by the ribbon button.
You just need to make a RibbonButton and set a control so that it will return all the id's of the active grid. In the link you will have the "SelectedControlSelectedItemIds" but you have more options available.
if you alter the XML of the solution. Your function will require a parameter.
function getSelectedItems(arrayOfIDS){
for(var i = 0; i < arrayofIDS.length;i++)
{
//Your implementation here
}
}
Alternatively you can choose to write a plugIn like Daryl suggests
EDIT: Ribbon Workbench: With this tool you can customize system buttons with visual ribbon button you can't.
I am testing a JQuery Web application. I have a JQuery popup that I simply cannot get the submit button to fire in Watir. The same pattern is used thought the application.
I have verified the button exists and have tried click, fireEvent you name it and am out of methods to call.
Has anyone solved this?
Which do you want ?
A. Control cursor and click "submit"
or
B. Simula te click "submit"
A:need to use Autoit and control cursor and click ,but only for windows OS. B:execute the javascript that when clicking "submit".
If B case,there is two ways I used always.
1.execute that code in URL-bar.
ex.) #ie.link(:URL, 'javascript:<-CODE->;').click
or
Make like that module and use it by include in test case.
ex.) #ie.excute_script(<-CODE->)
module Watir
class IE
def execute_script(scriptCode)
WIN32OLE.codepage = WIN32OLE::CP_UTF8
window.execScript(scriptCode)
end
def window
WIN32OLE.codepage = WIN32OLE::CP_UTF8
ie.Document.parentWindow
end
end
Maybe...
I hope it help.
Sorry my poor english.
tknv/
In my case the solution was to use and index value of 1. JQuery creates a copy of the form and all the popup items have an index of 1. The 0 index controls are on the original form.
I just had the same problem. Ajax upload for jQuery demo is an example page. I want to upload a file using Upload button on the left hand side of the page.
When I click Upload button by hand, file upload pop up appears.
When I click the button with Watir, nothing happens.
Gary (accepted answer) helped me to find a solution:
browser.file_field(:index, 1).set "/path/to/file"