hello,
I had a fckeditor at my php page, i want to put some data in fck editor when user click a button. How can i do that using javascript. Please help
Check the
OnClick="MyFunction()";
and inside the function open popup with editor
function MyFunction(){
window.open('url_to_fckeditor_file.php');
}
see here for more
hello,
I had a fckeditor at my php page, i want to put some data in fck editor when user click a button. How can i do that using javascript. Please help
I dont know why dani web is not that helpful now, as it was in past. Its heppening 4th time when i am posting my problem and no one is helping me with sound solutions.
Its really very sad situation.
I have two fck editors in my web page. and i just want when user click on a button, then data will copy in fck editor-2 from fckeditor-1. I had took value of editor-1 using its object instance but i dont know how i can put that value in editor 2. I hope now you will better understand what i need.
Ok, if you can copy the values from the fields in editor 1, then this should be able to assign them to editor2.
With the onlick function that was shown, you have to get the values of the input fields in editor 1
function get() {
var input1 = document.getElementById("myinput").value
// now if its a span or input u have to use one or the other
//span
document.getElementById("myspan2").innerHTML = input1;
//input
document.getElementById("myinput2").value = input1;
}
You know, you shouldnt go roaring on the forums how much daniweb sucks and people are un responsive. That makes people not want to help you even more, because your acting like a girl. Second, you need some kind of code to help you or a really good example. People cant see your page. Third, people have lifes. Now i hope this helped.
This is not what i need. What you think i am here and i didnt try this simple code you are giving me????
This not work for fckeditor, its just work for simple input objects like text box, text area, span etc.
function getval()
{
var Editor1 = FCKeditorAPI.GetInstance('editor1') ;
var editor1value=Editor1.GetHTML( );
document.getElementById("editor2").value= dueditorvalue;//assigning value to second editor - this line is not working
}
this is the code i am using. now please help me.
Man you have PhD in complaining :scared:
why don't you use libraries like JQuery if you do alot of JS?
Have you seen typos in your code? what is dueditorvalue
function getval()
{
var Editor1 = FCKeditorAPI.GetInstance('editor1') ;
var editor1value=Editor1.GetHTML( );
document.getElementById("editor2").value= editor1value ;//assigning value to second editor - this line is not working
}
hello,
People are trying to be very helpful here.
I had a fckeditor at my php page, i want to put some data in fck editor when user click a button. How can i do that using javascript. Please help
Hi BzzBee:
I customize the FCKEditor constantly (far beyond playing in the fckconfig.js), however, your question is not clear enough for me to help you.
To clarify your question further?
Are you attempting to create a toolbar button to insert data into the content area?
Can you spell it out?
var Editor1 = FCKeditorAPI.GetInstance('editor1') ;
var Editor2 = FCKeditorAPI.GetInstance('editor2');
Editor2.InsertHtml( Editor1.GetHTML() );
I had resolved this issue by myself. thanks for your replies
the solution of my question is as follows for other people facing same issue.
var Editor1 = FCKeditorAPI.GetInstance('editor1') ;
var Editor2 = FCKeditorAPI.GetInstance('editor2') ;
var editor1value=Editor1.GetHTML( );
Editor2.SetHTML(editor1value);
Can you mark this as solved please.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.