Skip to content

Cant get edited content #9

Closed
Closed
@khilkevichigor

Description

@khilkevichigor

Describe the bug

I have this:
<vaadin.version>24.5.0</vaadin.version>

and this from https://vaadin.com/directory/component/markdown-editor-add-on

<dependency>
   <groupId>com.flowingcode.vaadin.addons</groupId>
   <artifactId>markdown-editor-addon</artifactId>
   <version>1.0.0</version>
</dependency>

And I use this:

MarkdownEditor mde = new MarkdownEditor();
mde.setSizeFull();
mde.setHeight("300px");
mde.setMaxLength(500);
mde.setDataColorMode(BaseMarkdownComponent.DataColorMode.LIGTH);
mde.setContent(post.getPostText);//"aaa"
formLayout.add(mde);

I then change the text on the UI in mde from "aaa" to "bbb" and use that afterwards:

dialog.addDialogCloseActionListener(closeEvent -> {
      post.setPostText(mde.getContent()); //here for some reason i am getting "aaa" instead of "bbb"!
      postService.save(post);
});

Expected behavior

i expect to get "bbb"

Minimal reproducible example

No response

Add-on Version

1.0.0

Vaadin Version

24.5.0

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions