iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi,
Is there a way, server-side, to get the ID of the IFrame and the hidden field?
We have to add our custom javascript that needs to track changes and to replace or paste html in the editor.
Regards,
Alex
Hi Alexandre Liard,
Actually, you couldn't get the IFrame's ID inside WebTextEditor because it will be created by our API in client-side. Although, you could bind the content to iframe in your server side by using this function:
WebTextEditor1.LoadContentFromFile(Server.MapPath("./SampleHtml/Product Overview.html"), true);
You can see the sample in here http://live.intersoftpt.com/cs/WebTextEditor/WebTextEditor/SaveAndLoadContentToFile.aspx?noframe=1&path=/WebTextEditor/Rich%20Text%20Editor/Advanced%20Client-side%20and%20Server-side%20Programmability
Or you can populate the data from server side and send it to client side, then client side will set the value regarding its iframe ID. You can set the text using this SetValue function. See the sample here:
http://live.intersoftpt.com/cs/WebTextEditor/WebTextEditor/SetValueFromClientSide.aspx?noframe=1&path=/WebTextEditor/Rich%20Text%20Editor/Advanced%20Client-side%20and%20Server-side%20Programmability
If this matter doesn't resolve your problem, could you explain me the scenario that you want to achieve with WebTextEditor? Maybe with your scenario I can figure out some method to achieve your scenario. Look forward to hear any feedback from you so I can help you further.
Regards,Bernard
Hi Alex,
For the first scenario, you can put your javascript in specific IFrame by using OnInitialize client-side event. In WebTextEditor OnInitialize client-side event, WebTextEditor had been built so the content won't be changed during this event. You can also get the IFrame ID and attach a javascript to handle specific iframe's body which you couldn't get in Server-side. However, you shouldn't change the element inside WebTextEditor because it will cause error in our API.
For the second scenario, after you attach onkeydown event on specific iframe's body, you can put a variable that indicate the section that you pressed had been changed. You can also compare the HTML content inside this javascript but you should save the HTML content when OnInitialize client-side event is triggered. So it won't need any HiddenField to save the state of WebTextEditor's section.
I attach my sample here. Could you look in my sample and please let me know if this sample doesn't meet your requirement? You can also tell me step by step of scenario that you want to achieve by using WebTextEditor. I'll gladly help you further. Hope this helps.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname