Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rich text fields do not respect the plone.default_type setting #3974

Open
thet opened this issue Jun 11, 2024 · 0 comments
Open

rich text fields do not respect the plone.default_type setting #3974

thet opened this issue Jun 11, 2024 · 0 comments
Labels
01 type: bug 99 tag: bssp Potential task for the Buschenschanksprint

Comments

@thet
Copy link
Member

thet commented Jun 11, 2024

What I did

With this setting, where the default type is set to x-web-markdown:

<registry>
  <record name="plone.default_type">
    <value>text/x-web-markdown</value>
  </record>
  <record name="plone.allowed_types">
    <value>
      <element>text/html</element>
      <element>text/restructured</element>
      <element>text/x-web-markdown</element>
    </value>
  </record>
  <record name="plone.markdown_extensions">
    <value>
      <element>markdown.extensions.fenced_code</element>
      <element>markdown.extensions.nl2br</element>
      <element>markdown.extensions.extra</element>
      <element>markdown.extensions.codehilite</element>
      <element>mdx_linkify</element>
    </value>
  </record>
</registry>

Resp:

image

And form fields defined like so:

from plone.app.dexterity.textindexer import searchable
from plone.app.textfield import RichText as RichTextField
from plone.app.z3cform.widget import RichTextFieldWidget
from plone.autoform import directives as form
from plone.supermodel import model
from my.something import _


class ISomething(model.Schema):

    urls_published = RichTextField(
        title=_("label_urls_published", default="URLs published"),
        required=False,
    )
    form.widget("urls_published", RichTextFieldWidget)
    searchable("urls_published")

I get this in the edit/add forms:

image

What I expect

I would expect the form to automatically show the markdown mode. That is, no TinyMCE text editor.

Software versions

Plone 6.0.11.1

@thet thet added 99 tag: bssp Potential task for the Buschenschanksprint 01 type: bug labels Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
01 type: bug 99 tag: bssp Potential task for the Buschenschanksprint
Projects
Status: Todo
Development

No branches or pull requests

1 participant