Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
How can FormAPI be used to call Visual Format js?
buddyholly
Hi,
I have my FormAPI finally working, doing a validation on a browse field, and putting in div tags surrounding the content in the textfield. Now I'm having problems trying to figure out how to call external commands from the ewebeditproevents. js (Visual Format Editor). I have a custom command that I want to call? Or even just call the cmdclean command onsave of the DCR. How is this possible?
Find more posts tagged with
Comments
buddyholly
Can anyone help me?
MattP
Now I'm having problems trying to figure out how to call external commands from the ewebeditproevents. js (Visual Format Editor).
Page 49
Or even just call the cmdclean command onsave of the DCR.
cmdclean happens on change of the text field
Page 264
The VFE documentation is very thorough.
http://www.ektron.com/software/released/ewebeditpro/v26/developerguide.pdf
Matt
Matthew Petitjean
BOC Group
Murray Hill, NJ 07974 USA
buddyholly
Matt, I don't think you understand what I am trying to say. I am proficient with the VFE manual. I know how to run the cmdclean command, within the VFE. What my question was how can FormAPI call Visual Format commands that are from the ewebeditpro js libraries, like cmdclean.
I currently have a js file that is basically a save handler, because I want certain forced events to occur on the save, like browser field filename validation, which is working, and placing <div></div> tags surrounding our orignal content. Now I want to make sure that the content is forced clean because we require well formed xhtml. If it is in Wysiwyg view this works however if we call the save from code view then the code stays "as is". I am very aware that the code can be cleaned manually by switching between modes, or right click from the right context menu and select clean. However I do not want user intervention, there can be no room for error like someone forgetting to manually select clean, this all must be an automated process and must work on save of the DCR within any mode, either html or wysiwyg. Thanks for your help.
MattP
OK, got it. I do not know how to call the events from FormAPI. But, here are a few more ideas.
Is your publish attribute set to XHTML? I think what you are saying is that even with those settings, it doesn't happen unless the user uses the WYSIWYG view. Is that correct?
There is a "publishviewassource" attribute that will switch the view from source to WYSIWYG on save. At that point the HTML should be cleaned to XHTML. Default setting is true, which allows editor to save while in source view. Setting to flase will do the switch.
publishviewassource
Boolean “true”
Prevents content from being saved in "View As HTML"
mode. If publishviewassource="false", the editor
switches to WYSIWYG mode when the user saves the
content. This lets the user review the content ‘s format
before saving.
The default (publishviewassource="true") allows
the content to be saved "as is" when in View As HTML
mode.
Matt
Matthew Petitjean
BOC Group
Murray Hill, NJ 07974 USA
buddyholly
Thanks Matt, just tried it. Works like a charm! Headache gone
lwej2
Hi guys, I'm very interested in this subject too.
The 'publishviewassource' only works with eWebEditPro 2.6, right? Do you know which version of Teamsite, 2.6 is shipped with?
/Liza
Migrateduser
TeamSite 6 ships with version 3.1. TeamSite 5.5.2 SP3 updated VisualFormat to 2.6.
Regards,
lissa
bcvbbbjnn
In TeamSite 6.1 when Visual Format Client is installed on the DCR on clicking the visual format enabled field The following error is obtained.
"WARNING: All XML functionality is disabled.
The eWebEditPro+XML license key is either missing or is invalid. To use XML, you must provide eWebEditPro+XML with a valid XML license key. Please add the key to the 'ewebeditprolicensekey.txt'file."
How to rectify this problem? Can some body help me soon
jzhuang
Here is something you may try:
Bring up one of the sample DCR's (like Internet/pr) and see if you get the license problem. If you don't, then it means something is wrong with your own DCR. Most likely it's because of an invalid visual format config file is specified. You can either remove the config file from DCR to use the default one or change to a valid file. The license error should disappear.