Rich Text Editor

42 views
Skip to first unread message

Mark van Berkel

unread,
Jun 16, 2014, 2:30:09 PM6/16/14
to topbrai...@googlegroups.com
I would like to do some basic authoring of a HTML snippet within a SWA form. From what I've found, the EVN Geography uses the TinyMCE rich text editor I think would work well: https://04303374606417597301.googlegroups.com/attach/2bfaf4670f561885/aafhggej.jpg?part=0.1.1&view=1&vt=ANaJVrF43OouUPCFlae0ix_aR5HOKw1pj-ejlyyYrT3xuGMl0QER3dlLTrx_YF9JKlPx80UeZX8VtMiOGclcP5CSGTW3mjMyJUrWVzcYMcgcUtkrq-PkdRU

How can I make the SWA Gadget display the enhanced editor for one of my properties?

Thanks!
Mark

Scott Henninger

unread,
Jun 16, 2014, 2:47:23 PM6/16/14
to topbrai...@googlegroups.com
Mark, you can use the editWidget attribute.  For example:
  <swa:Objects arg:editWidget="evnui:RichTextEditor" arg:predicate="{= ?pred}"/>

-- Scott
--
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to
topbrai...@googlegroups.com
To unsubscribe from this group, send email to
topbraid-user...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en
---
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Irene Polikoff

unread,
Jun 16, 2014, 3:19:21 PM6/16/14
to topbrai...@googlegroups.com

Btw, in the upcoming 4.5 release, we will have a web based form editor similarly to how there is a form editor in TBC. With it, one could select the appropriate widgets for properties including the rich text widget. For more technical users, the editor also allows one to see the definition code it generates.

 

We hope the new feature will not only make it easier to customize forms, but also serve as a tool for learning how to use some of SWA capabilities.

Mark van Berkel

unread,
Jun 16, 2014, 4:44:34 PM6/16/14
to topbrai...@googlegroups.com
Thanks Scott, got it to show up and save to my graph by first tracing back evnui:RichTextEditor through the evn.ui.ttlx graph to find the skos:Concept instanceView. I added to my application header the JS and CSS expected, however I'm getting some Javascript alerts, "Error: Invalid use of swa.load: No element found with id mainForm" and "Error: Element with id conceptTree does not have treedataprovider attribute."  I figure its got something to do with my SWA Application and gadgets aren't what the EVN javascript is expecting. Will play around with it, see if I can't avoid the errors messages. 

Irene, that sounds like it would be much easier way to get to the same result. 

Regards,
Mark

Holger Knublauch

unread,
Jun 16, 2014, 5:16:36 PM6/16/14
to topbrai...@googlegroups.com
Hi Mark,

in 4.4 the evnui:RichTextEditor has only been provided for the EVN taxonomy editor. I have meanwhile generalized it to work for other EVN applications as well, and this has also changed its URI in 4.5. You may need to wait until 4.5 to use it properly. I believe a problem is that the rich text editor requires some "manual" initialization step that is hard to generalize. So my question is: are you inside of a custom EVN application or a general SWA application?

Thanks
Holger

Mark van Berkel

unread,
Jun 17, 2014, 8:29:49 AM6/17/14
to topbrai...@googlegroups.com
Hi Holger,

It is a general SWA application. I made a local copy of the evn.js and removed all the functions unrelated to the rich text editor and now all is well. 

Thanks,
Mark



You received this message because you are subscribed to a topic in the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/topbraid-users/XtJYUDopBnY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to topbraid-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Mark van Berkel, MEng, MBA
President, Hunch Manifest Inc.
Reply all
Reply to author
Forward
0 new messages