How to set caret after pasted range in webrowser control - insert

I am trying to add a table to an existing mshtml document. I have created the html for the table and then added it with
.DomDocument.selection.createRange().pasteHTML(myTableHTML)
This works OK but the caret is left before the table rather than after it. How can I move the caret?

Related

I am editing a cms block , I want to add another submenu but everytime I paste the copied information, it messes up format

I am trying to add another sub menu that shows content on the right when you hover. I copied lines from the existing codes and replaced with the information I need, but messes up format

Ckeditor Cursor position issue

Creating some predefined html template to be inserted on instance ready of the ckeditor. Place the cursor on the created element but the cursor position moves to the top of the template sometimes. Please suggest.

Oracle Forms Builder: Cannot Execute Query

I am using this code fragment:
BEGIN
GO_BLOCK('COMPANY_PRODUCTS');
EXECUTE_QUERY;
END;
in WHEN-NEW-FORM-INSTANCE of my form module.
I also changed the text items of my data block into display items.
The problem is that when I start running my form module, it displays an error stating:
FRM-40106: No navigable items in destination block.
It doesn't have "Enabled" and "Keyboard Navigable" property.
The reason I changed it to display items is because I don't want the user to click and edit the text on the item.
Is there any way can I get through this problem? or should I just stick with text items?
Screenshot: Form Module on Web Browser
make your destination block's all item Display Item, except leave one of them as Text Item ( preferably the first one in the physical sequence of items [topmost or leftmost]). And then, set that text item's Update Allowed and Insert Allowed property to No from Database section of Property Palette.

Export Dropdown Selection in Kendo Editor to Word Document

I've been trying to get a selected dropdown option to appear in a Word Document on export.
The current default behavior is that all option tags appear in the exported document with no indication of which was selected. (This makes sense that this behavior would occur since the export function is simply exporting all the html as plain text).
So far, these are the approaches I've tried (none of which work):
-Capture the export event before it is sent to the controller via the javascript execute event (thus being able to strip out any unwanted text). The issue is the execute event and exportas event are asynchronous, so I can't modify the file before the export event call is executed.
-Modify the text on the controller side before it is converted to a Word document and downloaded (the text is sent through without special characters, which makes it nearly impossible to parse)
-Attempt to replace the dropdown with a kendo autocomplete widget (this would also be an acceptable solution). The widget does not render properly inside the document. All of the datasource options are there and even filters corretly, but it does not style correctly or open.
Has anyone else been able to find a solution to this problem or have another approach I could use?
EDIT:
As per requested, here is a screenshot of the base code:
My initial idea on how you could accomplish this:
1. Pull that select list out of your editor.
2. Bind an event handler to the change event of your list to add the value of your list into the editor. Are you using JQuery in your project? It's a dependency for Kendo so this ought to work:
$("#selectListId").on("change", function () {
$("#editor").val( $("#selectListId").val());
});
In reality though I'm guessing this approach will be used to populate some template of text with values selected by the user? In that case, you may want to save the template first before applying the value selected.
Now that you've identified you need that dropdown menu to be usable on the exported word document, attempt the following:
Create a new word document.
In that word document, open the Developer tab. (If you don't know about it, google how to enable it)
Insert a new Dropdown Menu Content Control using the Developer tab.
Select this content control, then open Properties menu item on Developer tab.
Update the content control with your values:
Save this word document.
Use the Kendo Editor Import to import this document containing your template.
Attempt exporting what was just imported.
If that works and the editor has editable dropdowns from that content control, I will be very surprised... Good luck!

Change selection after inserting xml text in Word Interop App

I have a word addin that creates a list of fields that can be place in a word document. When you select a field either by drag and drop or doubleclick, it places that field on the document and an xml part is creaed inside the document. That works fine. What I want to do is move the selection position in word to be after the xml part that was just inserted. So if the field said "date created", I want to move the selection point to be the following line after "date created". Any ideas on how to do this? Thanks.
I am assuming you are using a range to insert the field?
if so you can collapse to the end of the range then add what you want.
Example:
// Move to the end
myRange.Collapse(Microsoft.Office.Interop.Word.WdCollapseDirection.wdCollapseEnd);
// Now add something behind the table to prevent word from joining tables into one
myRange.InsertParagraphAfter();
//to move to the end again
myRange.Collapse(Microsoft.Office.Interop.Word.WdCollapseDirection.wdCollapseEnd);

Resources