- if (name == wxT("text") || name == wxT("symbol"))
- return new wxRichTextPlainText;
- else if (name == wxT("image"))
- return new wxRichTextImage;
- else if (name == wxT("paragraph"))
- return new wxRichTextParagraph;
- else if (name == wxT("paragraphlayout"))
- return new wxRichTextParagraphLayoutBox;
- else if (name == wxT("textbox"))
- return new wxRichTextBox;
- else if (name == wxT("cell"))
- return new wxRichTextCell;
- else if (name == wxT("table"))
- return new wxRichTextTable;
- else
+ // The standard node to class mappings are added in wxRichTextModule::OnInit in richtextbuffer.cpp
+ wxStringToStringHashMap::const_iterator it = sm_nodeNameToClassMap.find(name);
+ if (it == sm_nodeNameToClassMap.end())