Hello Marianne, On Mon, Jan 25, 2016 at 6:30 PM, Marianne Hagaseth < [email protected]> wrote:
> Hi, > Thanks a lot for this summernote editor integration! > https://github.com/isisaddons/isis-wicket-summernote > > Just two questions: > > 1) How do I enter the code view text to the domain property? For > instance, I want to set a String property of a Domain object to for > instance " <span style="background-color: inherit;"><span > style="background-color: yellow;"> </span><span style="background-color: yellow;"><br></span>". The result of > this then should be that the words 'Passenger ships' are highlighted in > yellow. > In your domain object you have to add a property like: https://github.com/isisaddons/isis-wicket-summernote/blob/a351bd07d9ae2c059a3d4275c1b9c84e696abf47/fixture/src/main/java/org/isisaddons/wicket/summernote/fixture/dom/SummernoteEditorToDoItem.java#L392-L402 i.e. a String property annotated with @SummernoteEditor The value of this String property is HTML snippet like the one you mentioned above. I'd generate it the first time with Summernote itself. I just did it for you at http://wb-mgrigorov.rhcloud.com/summernote and it produced: <span style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: small; line-height: normal;"><span style="background-color: yellow;">Passenger ships</span> have more than 12 passengers.</span> If you set this HTML as initial value for the property then it will render as you want it. > > 2) Is it possible to have more than one domain property annotated > with summernote in one page/Domain object? > Sure. There is no limit in the number of Summernote editors in the page. > > Med vennlig hilsen / Best regards, > Marianne Hagaseth > Forsker - Maritime transportsystemer > Research Scientist - Maritime Transport Systems > > MARINTEK (Norsk Marinteknisk Forskningsinstitutt AS) > Address: POB 4125 Valentinlyst, NO-7450 Trondheim, Norway > Mobile: +47 90 95 64 69 - Phone: +47 464 15 000 > Web: www.marintek.sintef.no<http://www.marintek.sintef.no/> > >
