Hello Shalini,
You can get selected value using following jquery code,
and you have to pass that value into the microflow.
function getSelectedText(el) {
var sel, range;
if (typeof el.selectionStart == "number" && typeof el.selectionEnd == "number") {
return el.value.slice(el.selectionStart, el.selectionEnd);
} else if (
(sel = document.selection) &&
sel.type == "Text" &&
(range = sel.createRange()).parentElement() == el) {
return range.text;
}
return "";
}
window.onload = function() {
document.getElementById("ta").onselect = function() {
alert("Selected text: " + getSelectedText(this));
};
};
Hi,
I am new to Mendix platform. I tried with the above method.But the problem is Before deploying a project into eclipse I am supposed to select the input type in java action call.But how can I give the input Because according to my requirement the input is users selected text.So what I should select in input field.
Thanks in Advance.
Would be easier for a first solution to provide your users a text box where they can copy and paste the text into and convert text to speech by button click. because then you would have the text in an attribute already which you can use and pass to your java