简体   繁体   English

Drupal模块,可将文本从上传的文本文件复制到节点主体

[英]Drupal module that copies text from uploaded text file to node body

I am trying to find a way to add two ways to create nodes: 1) provide the standard node body textarea for users to type or copy/paste text and 2) allow users to upload text files to be added to the node body field. 我正在尝试找到一种添加两种创建节点的方法:1)提供标准的节点正文文本区域供用户键入或复制/粘贴文本,以及2)允许用户上载要添加到节点正文字段的文本文件。

The upload process should basically behave like a user just copied the text from the file and pasted it into the node's body textarea. 上载过程基本上应该像用户刚刚从文件中复制文本并将其粘贴到节点的正文文本区域中一样。

I am having a hard time trying to find a module that will allow users to upload a text file and have that text get "pasted" into the node's body field. 我很难找到一个模块,该模块将允许用户上传文本文件并使该文本“粘贴”到节点的body字段中。 I also only want one place (the body field) to store text. 我也只想在一个地方(正文字段)存储文本。 (not one file field for text uploaders and one node body field for "copy and pasters") (对于文本上载器,没有一个文件字段,对于“复制和粘贴”,没有一个节点主体字段)

Any suggestions on how this can be accomplished with current drupal 7 modules? 关于当前drupal 7模块如何实现的任何建议?

Thanks! 谢谢!

Few months ago I started a project that do exactly it, but from a PDF. 几个月前,我启动了一个完全做到这一点的项目,但它来自PDF。

Unfortunately, we changed our mind and I didn't improve the module, but it works. 不幸的是,我们改变了主意,我没有改进该模块,但是它可以正常工作。

Check it out there http://drupal.org/sandbox/yvmarques/1243860 在那里检查一下http://drupal.org/sandbox/yvmarques/1243860

And if you want, don't hesitate to add some patches. 而且,如果您愿意,可以随时添加一些补丁。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM