Apostrophe cms - inline editing of rich text in custom widgets?

前端 未结 1 1778
野性不改
野性不改 2021-01-26 09:07

I can\'t make inline editing of rich text save back to the db in some cases.

Please bear with me, there will be some code pasted here, as it is the only way I can descri

相关标签:
1条回答
  • 2021-01-26 09:22

    One of Apostrophe's subtleties is that any property beginning with an underscore (_) (except _id) is not actually part of the parent object and changes don't go back to the database

    These are properties attached for convenience by Apostrophe somewhere in the retrieval process.

    I don't thinkg modifying the piece from the widget is something baked in by default (typically piece-widgets are single-serving views for content) but it is possible to set up custom backend functionality.

    Not a total 1:1 of your issue but if you look at the comments and comments-widgets module in this (rough) example, you can see we're modifying the piece's content via the widget.

    https://github.com/stuartromanek/apostrophe-comment-system/tree/master/lib/modules

    0 讨论(0)
提交回复
热议问题