MCPcopy Create free account
hub / github.com/dot-agent/nextpy / create

Method create

nextpy/frontend/components/suneditor/editor.py:213–234  ·  view source on GitHub ↗

Create an instance of Editor. No children allowed. Args: set_options(Optional[EditorOptions]): Configuration object to further configure the instance. **props: Any properties to be passed to the Editor Returns: An Editor instance. Raises

(cls, set_options: Optional[EditorOptions] = None, **props)

Source from the content-addressed store, hash-verified

211
212 @classmethod
213 def create(cls, set_options: Optional[EditorOptions] = None, **props) -> Component:
214 """Create an instance of Editor. No children allowed.
215
216 Args:
217 set_options(Optional[EditorOptions]): Configuration object to further configure the instance.
218 **props: Any properties to be passed to the Editor
219
220 Returns:
221 An Editor instance.
222
223 Raises:
224 ValueError: If set_options is a state Var.
225 """
226 if set_options is not None:
227 if isinstance(set_options, Var):
228 raise ValueError("EditorOptions cannot be a state Var")
229 props["set_options"] = {
230 to_camel_case(k): v
231 for k, v in set_options.dict().items()
232 if v is not None
233 }
234 return super().create(*[], **props)

Callers

nothing calls this directly

Calls 3

to_camel_caseFunction · 0.90
itemsMethod · 0.80
dictMethod · 0.45

Tested by

no test coverage detected