- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2022 02:58 PM
How to pass a parameter to a tinymce in a UI page?
I am passing the following info through a UI action as follow:
function openUIPage() {
var dialog = new GlideDialogWindow('x_banun_creops_ui_page_demo');
dialog.setTitle("TITLE")); //Set the dialog title
dialog.setPreference('sysparm_emailbody', g_form.getValue('email_body') );
dialog.render(); //Open the dialog
}
How do I pass that into a UI page that has the following TinyMCE?
<g:evaluate var="jvar_email_body" expression="RP.getWindowProperties().get('sysparm_emailbody')" />
<script>
tinymce.init({
mode : "specific_textareas",
editor_selector : "mce",
width: '100%',
height: '300px',
menubar: "tools",
toolbar: "$[gs.getProperty('glide.ui.html.editor.v4.toolbar.line1')]",
content_css : "* {font: 10px arial, sans-serif;} b {font-weight:bold;} th {font-weight:bold;} strong {font-weight:bold;}",
});
</script>
<textarea cols="80" rows="10" id="myArea2" name="myArea" class="mce"></textarea>
I tried to do value="${sysparm_emailbody}" but I had no luck!
SO I want to see the value that I passed inside the tinymce field.
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2022 03:30 PM
<textarea cols="80" rows="10" id="myArea2" name="myArea" class="mce">
${jvar_v1}
</textarea>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2022 03:11 PM
hello
This line will get the value from UI action
<g:evaluate var="jvar_v1" expression="RP.getWindowProperties().get('sysparm_emailbody')" />
This line will Print your value that you tried to access from UI action parameters
<span id="var1">${jvar_v1}</span>
Please mark the answer correct if it helps you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2022 03:28 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2022 03:30 PM
<textarea cols="80" rows="10" id="myArea2" name="myArea" class="mce">
${jvar_v1}
</textarea>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2022 03:30 PM