We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Bunch of questions about document editor implementation.

Thread ID:

Created:

Updated:

Platform:

Replies:

141782 Jan 4,2019 03:05 AM UTC Jan 4,2019 09:54 AM UTC JavaScript - EJ 2 1
loading
Tags: DocumentEditor
sampurnima kovi
Asked On January 4, 2019 03:05 AM UTC

1. How to get a listener activated when cursor is in a table. Looking for an event listener.
2. How to get page count placed in the footer
3. How to get header or footer content left, center, right alignment
4. Nothing to do with document editor, where is the list of css class icon list in the documentation.

Thanks for the help

 

Ramya Thirugnanam [Syncfusion]
Replied On January 4, 2019 09:54 AM UTC

Hi Sampurnima, 
 
Please find the responses to your queries as below. 
 
Query  
Response  
How to get a listener activated when cursor is in a table. Looking for an event listener. 
We can achieve your requirement by using selectionChange event of Document Editor and ContextType property of selection module. This  selectionChange” event is triggered every time when selection is changed.  
 
 
 
 
Please find the code example to achieve your requirement as below. 
 
/** 
* Initialize document editor 
*/ 
let documentEditor: DocumentEditor = new DocumentEditor(); 
 
documentEditor.selectionChange = (): void => { 
if (documentEditor.selection.contextType.indexOf('Table') !== -1) { 
    // Add your event listener code here 
        alert("Cursor is inside table"); 
    } 
} 
 
 
How to get page count placed in the footer 
We can get the page count by using “insertPageCount” property in Editor module and which insert page count in current cursor position. Please find the sample code below  
 
// Insert Page count at current cursor position 
documentEditor.editor.insertPageCount(); 
 
 
How to get header or footer content left, center, right alignment 
Document content can be aligned left/ center/ right by using “selectionParagraphFormat” in Selection module. 
 
 
Sample Code 
//To Right Align selected content  
documenteditor.selection.paragraphFormat.textAlignment = 'Right'; 
 
//To Left Align selected content  
documenteditor.selection.paragraphFormat.textAlignment = 'Left'; 
 
//To Center Align selected content  
documenteditor.selection.paragraphFormat.textAlignment = Center; 
 
 
Nothing to do with document editor, where is the list of css class icon list in the documentation. 
We don’t have list of CSS classes used in our component. But, we have list of icons which we used in our component. Please find the list of icons from the following line. 
 
 
 
Regards, 
Ramya T 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;